aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-07-24 00:26:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:14 -0400
commitb61bfa3c462671c48a51fb5c31af337c5a996a04 (patch)
tree020363fd43a85ddde9998759150b428ee794dae6 /arch
parent8b05c7e6e159d2f33c9275281b8b909a89eb7c5d (diff)
mm: move bootmem descriptors definition to a single place
There are a lot of places that define either a single bootmem descriptor or an array of them. Use only one central array with MAX_NUMNODES items instead. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Richard Henderson <rth@twiddle.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: David S. Miller <davem@davemloft.net> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/mm/numa.c8
-rw-r--r--arch/arm/mm/discontig.c34
-rw-r--r--arch/ia64/mm/discontig.c11
-rw-r--r--arch/m32r/mm/discontig.c4
-rw-r--r--arch/m68k/mm/init.c4
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c4
-rw-r--r--arch/parisc/mm/init.c3
-rw-r--r--arch/powerpc/mm/numa.c3
-rw-r--r--arch/sh/mm/numa.c5
-rw-r--r--arch/sparc64/mm/init.c3
-rw-r--r--arch/x86/mm/discontig_32.c3
-rw-r--r--arch/x86/mm/numa_64.c4
12 files changed, 35 insertions, 51 deletions
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 10ab7833e83c..a53fda0481ca 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -19,7 +19,6 @@
19#include <asm/pgalloc.h> 19#include <asm/pgalloc.h>
20 20
21pg_data_t node_data[MAX_NUMNODES]; 21pg_data_t node_data[MAX_NUMNODES];
22bootmem_data_t node_bdata[MAX_NUMNODES];
23EXPORT_SYMBOL(node_data); 22EXPORT_SYMBOL(node_data);
24 23
25#undef DEBUG_DISCONTIG 24#undef DEBUG_DISCONTIG
@@ -141,7 +140,7 @@ setup_memory_node(int nid, void *kernel_end)
141 printk(" not enough mem to reserve NODE_DATA"); 140 printk(" not enough mem to reserve NODE_DATA");
142 return; 141 return;
143 } 142 }
144 NODE_DATA(nid)->bdata = &node_bdata[nid]; 143 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
145 144
146 printk(" Detected node memory: start %8lu, end %8lu\n", 145 printk(" Detected node memory: start %8lu, end %8lu\n",
147 node_min_pfn, node_max_pfn); 146 node_min_pfn, node_max_pfn);
@@ -304,8 +303,9 @@ void __init paging_init(void)
304 dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; 303 dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
305 304
306 for_each_online_node(nid) { 305 for_each_online_node(nid) {
307 unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT; 306 bootmem_data_t *bdata = &bootmem_node_data[nid];
308 unsigned long end_pfn = node_bdata[nid].node_low_pfn; 307 unsigned long start_pfn = bdata->node_boot_start >> PAGE_SHIFT;
308 unsigned long end_pfn = bdata->node_low_pfn;
309 309
310 if (dma_local_pfn >= end_pfn - start_pfn) 310 if (dma_local_pfn >= end_pfn - start_pfn)
311 zones_size[ZONE_DMA] = end_pfn - start_pfn; 311 zones_size[ZONE_DMA] = end_pfn - start_pfn;
diff --git a/arch/arm/mm/discontig.c b/arch/arm/mm/discontig.c
index 1e5602189507..c8c0c4b0f0a3 100644
--- a/arch/arm/mm/discontig.c
+++ b/arch/arm/mm/discontig.c
@@ -21,26 +21,24 @@
21 * Our node_data structure for discontiguous memory. 21 * Our node_data structure for discontiguous memory.
22 */ 22 */
23 23
24static bootmem_data_t node_bootmem_data[MAX_NUMNODES];
25
26pg_data_t discontig_node_data[MAX_NUMNODES] = { 24pg_data_t discontig_node_data[MAX_NUMNODES] = {
27 { .bdata = &node_bootmem_data[0] }, 25 { .bdata = &bootmem_node_data[0] },
28 { .bdata = &node_bootmem_data[1] }, 26 { .bdata = &bootmem_node_data[1] },
29 { .bdata = &node_bootmem_data[2] }, 27 { .bdata = &bootmem_node_data[2] },
30 { .bdata = &node_bootmem_data[3] }, 28 { .bdata = &bootmem_node_data[3] },
31#if MAX_NUMNODES == 16 29#if MAX_NUMNODES == 16
32 { .bdata = &node_bootmem_data[4] }, 30 { .bdata = &bootmem_node_data[4] },
33 { .bdata = &node_bootmem_data[5] }, 31 { .bdata = &bootmem_node_data[5] },
34 { .bdata = &node_bootmem_data[6] }, 32 { .bdata = &bootmem_node_data[6] },
35 { .bdata = &node_bootmem_data[7] }, 33 { .bdata = &bootmem_node_data[7] },
36 { .bdata = &node_bootmem_data[8] }, 34 { .bdata = &bootmem_node_data[8] },
37 { .bdata = &node_bootmem_data[9] }, 35 { .bdata = &bootmem_node_data[9] },
38 { .bdata = &node_bootmem_data[10] }, 36 { .bdata = &bootmem_node_data[10] },
39 { .bdata = &node_bootmem_data[11] }, 37 { .bdata = &bootmem_node_data[11] },
40 { .bdata = &node_bootmem_data[12] }, 38 { .bdata = &bootmem_node_data[12] },
41 { .bdata = &node_bootmem_data[13] }, 39 { .bdata = &bootmem_node_data[13] },
42 { .bdata = &node_bootmem_data[14] }, 40 { .bdata = &bootmem_node_data[14] },
43 { .bdata = &node_bootmem_data[15] }, 41 { .bdata = &bootmem_node_data[15] },
44#endif 42#endif
45}; 43};
46 44
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 544dc420c65e..2fcf8464331e 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -36,7 +36,6 @@ struct early_node_data {
36 struct ia64_node_data *node_data; 36 struct ia64_node_data *node_data;
37 unsigned long pernode_addr; 37 unsigned long pernode_addr;
38 unsigned long pernode_size; 38 unsigned long pernode_size;
39 struct bootmem_data bootmem_data;
40 unsigned long num_physpages; 39 unsigned long num_physpages;
41#ifdef CONFIG_ZONE_DMA 40#ifdef CONFIG_ZONE_DMA
42 unsigned long num_dma_physpages; 41 unsigned long num_dma_physpages;
@@ -76,7 +75,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len,
76 int node) 75 int node)
77{ 76{
78 unsigned long cstart, epfn, end = start + len; 77 unsigned long cstart, epfn, end = start + len;
79 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 78 struct bootmem_data *bdp = &bootmem_node_data[node];
80 79
81 epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; 80 epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT;
82 cstart = GRANULEROUNDDOWN(start); 81 cstart = GRANULEROUNDDOWN(start);
@@ -167,7 +166,7 @@ static void __init fill_pernode(int node, unsigned long pernode,
167{ 166{
168 void *cpu_data; 167 void *cpu_data;
169 int cpus = early_nr_cpus_node(node); 168 int cpus = early_nr_cpus_node(node);
170 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 169 struct bootmem_data *bdp = &bootmem_node_data[node];
171 170
172 mem_data[node].pernode_addr = pernode; 171 mem_data[node].pernode_addr = pernode;
173 mem_data[node].pernode_size = pernodesize; 172 mem_data[node].pernode_size = pernodesize;
@@ -224,7 +223,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len,
224{ 223{
225 unsigned long epfn; 224 unsigned long epfn;
226 unsigned long pernodesize = 0, pernode, pages, mapsize; 225 unsigned long pernodesize = 0, pernode, pages, mapsize;
227 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 226 struct bootmem_data *bdp = &bootmem_node_data[node];
228 227
229 epfn = (start + len) >> PAGE_SHIFT; 228 epfn = (start + len) >> PAGE_SHIFT;
230 229
@@ -440,7 +439,7 @@ void __init find_memory(void)
440 efi_memmap_walk(find_max_min_low_pfn, NULL); 439 efi_memmap_walk(find_max_min_low_pfn, NULL);
441 440
442 for_each_online_node(node) 441 for_each_online_node(node)
443 if (mem_data[node].bootmem_data.node_low_pfn) { 442 if (bootmem_node_data[node].node_low_pfn) {
444 node_clear(node, memory_less_mask); 443 node_clear(node, memory_less_mask);
445 mem_data[node].min_pfn = ~0UL; 444 mem_data[node].min_pfn = ~0UL;
446 } 445 }
@@ -460,7 +459,7 @@ void __init find_memory(void)
460 else if (node_isset(node, memory_less_mask)) 459 else if (node_isset(node, memory_less_mask))
461 continue; 460 continue;
462 461
463 bdp = &mem_data[node].bootmem_data; 462 bdp = &bootmem_node_data[node];
464 pernode = mem_data[node].pernode_addr; 463 pernode = mem_data[node].pernode_addr;
465 pernodesize = mem_data[node].pernode_size; 464 pernodesize = mem_data[node].pernode_size;
466 map = pernode + pernodesize; 465 map = pernode + pernodesize;
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c
index 07c1af7dc0e2..aa9145ef6cca 100644
--- a/arch/m32r/mm/discontig.c
+++ b/arch/m32r/mm/discontig.c
@@ -20,7 +20,6 @@ extern char _end[];
20 20
21struct pglist_data *node_data[MAX_NUMNODES]; 21struct pglist_data *node_data[MAX_NUMNODES];
22EXPORT_SYMBOL(node_data); 22EXPORT_SYMBOL(node_data);
23static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata;
24 23
25pg_data_t m32r_node_data[MAX_NUMNODES]; 24pg_data_t m32r_node_data[MAX_NUMNODES];
26 25
@@ -81,7 +80,7 @@ unsigned long __init setup_memory(void)
81 for_each_online_node(nid) { 80 for_each_online_node(nid) {
82 mp = &mem_prof[nid]; 81 mp = &mem_prof[nid];
83 NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; 82 NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid];
84 NODE_DATA(nid)->bdata = &node_bdata[nid]; 83 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
85 min_pfn = mp->start_pfn; 84 min_pfn = mp->start_pfn;
86 max_pfn = mp->start_pfn + mp->pages; 85 max_pfn = mp->start_pfn + mp->pages;
87 bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, 86 bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn,
@@ -163,4 +162,3 @@ unsigned long __init zone_sizes_init(void)
163 162
164 return holes; 163 return holes;
165} 164}
166
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index d8fb9c5303cc..79f5f94d4800 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -32,8 +32,6 @@
32 32
33DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 33DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
34 34
35static bootmem_data_t __initdata bootmem_data[MAX_NUMNODES];
36
37pg_data_t pg_data_map[MAX_NUMNODES]; 35pg_data_t pg_data_map[MAX_NUMNODES];
38EXPORT_SYMBOL(pg_data_map); 36EXPORT_SYMBOL(pg_data_map);
39 37
@@ -58,7 +56,7 @@ void __init m68k_setup_node(int node)
58 pg_data_table[i] = pg_data_map + node; 56 pg_data_table[i] = pg_data_map + node;
59 } 57 }
60#endif 58#endif
61 pg_data_map[node].bdata = bootmem_data + node; 59 pg_data_map[node].bdata = bootmem_node_data + node;
62 node_set_online(node); 60 node_set_online(node);
63} 61}
64 62
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 42cd10956306..060d853d7b35 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -33,8 +33,6 @@
33#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) 33#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT)
34#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) 34#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT)
35 35
36static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES];
37
38struct node_data *__node_data[MAX_COMPACT_NODES]; 36struct node_data *__node_data[MAX_COMPACT_NODES];
39 37
40EXPORT_SYMBOL(__node_data); 38EXPORT_SYMBOL(__node_data);
@@ -403,7 +401,7 @@ static void __init node_mem_init(cnodeid_t node)
403 */ 401 */
404 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); 402 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT);
405 403
406 NODE_DATA(node)->bdata = &plat_node_bdata[node]; 404 NODE_DATA(node)->bdata = &bootmem_node_data[node];
407 NODE_DATA(node)->node_start_pfn = start_pfn; 405 NODE_DATA(node)->node_start_pfn = start_pfn;
408 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; 406 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
409 407
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index b4d6c8777ed0..0ddf4904640a 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -36,7 +36,6 @@ extern int data_start;
36 36
37#ifdef CONFIG_DISCONTIGMEM 37#ifdef CONFIG_DISCONTIGMEM
38struct node_map_data node_data[MAX_NUMNODES] __read_mostly; 38struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
39bootmem_data_t bmem_data[MAX_NUMNODES] __read_mostly;
40unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; 39unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;
41#endif 40#endif
42 41
@@ -262,7 +261,7 @@ static void __init setup_bootmem(void)
262#ifdef CONFIG_DISCONTIGMEM 261#ifdef CONFIG_DISCONTIGMEM
263 for (i = 0; i < MAX_PHYSMEM_RANGES; i++) { 262 for (i = 0; i < MAX_PHYSMEM_RANGES; i++) {
264 memset(NODE_DATA(i), 0, sizeof(pg_data_t)); 263 memset(NODE_DATA(i), 0, sizeof(pg_data_t));
265 NODE_DATA(i)->bdata = &bmem_data[i]; 264 NODE_DATA(i)->bdata = &bootmem_node_data[i];
266 } 265 }
267 memset(pfnnid_map, 0xff, sizeof(pfnnid_map)); 266 memset(pfnnid_map, 0xff, sizeof(pfnnid_map));
268 267
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index cf4bffba6f7c..d9a181351332 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -39,7 +39,6 @@ EXPORT_SYMBOL(numa_cpu_lookup_table);
39EXPORT_SYMBOL(numa_cpumask_lookup_table); 39EXPORT_SYMBOL(numa_cpumask_lookup_table);
40EXPORT_SYMBOL(node_data); 40EXPORT_SYMBOL(node_data);
41 41
42static bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES];
43static int min_common_depth; 42static int min_common_depth;
44static int n_mem_addr_cells, n_mem_size_cells; 43static int n_mem_addr_cells, n_mem_size_cells;
45 44
@@ -816,7 +815,7 @@ void __init do_init_bootmem(void)
816 dbg("node %d\n", nid); 815 dbg("node %d\n", nid);
817 dbg("NODE_DATA() = %p\n", NODE_DATA(nid)); 816 dbg("NODE_DATA() = %p\n", NODE_DATA(nid));
818 817
819 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 818 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
820 NODE_DATA(nid)->node_start_pfn = start_pfn; 819 NODE_DATA(nid)->node_start_pfn = start_pfn;
821 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; 820 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
822 821
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
index 1663199ce888..095d93bec7cd 100644
--- a/arch/sh/mm/numa.c
+++ b/arch/sh/mm/numa.c
@@ -14,7 +14,6 @@
14#include <linux/pfn.h> 14#include <linux/pfn.h>
15#include <asm/sections.h> 15#include <asm/sections.h>
16 16
17static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
18struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 17struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
19EXPORT_SYMBOL_GPL(node_data); 18EXPORT_SYMBOL_GPL(node_data);
20 19
@@ -35,7 +34,7 @@ void __init setup_memory(void)
35 NODE_DATA(0) = pfn_to_kaddr(free_pfn); 34 NODE_DATA(0) = pfn_to_kaddr(free_pfn);
36 memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); 35 memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
37 free_pfn += PFN_UP(sizeof(struct pglist_data)); 36 free_pfn += PFN_UP(sizeof(struct pglist_data));
38 NODE_DATA(0)->bdata = &plat_node_bdata[0]; 37 NODE_DATA(0)->bdata = &bootmem_node_data[0];
39 38
40 /* Set up node 0 */ 39 /* Set up node 0 */
41 setup_bootmem_allocator(free_pfn); 40 setup_bootmem_allocator(free_pfn);
@@ -66,7 +65,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
66 free_pfn += PFN_UP(sizeof(struct pglist_data)); 65 free_pfn += PFN_UP(sizeof(struct pglist_data));
67 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 66 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
68 67
69 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 68 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
70 NODE_DATA(nid)->node_start_pfn = start_pfn; 69 NODE_DATA(nid)->node_start_pfn = start_pfn;
71 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; 70 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
72 71
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 84898c44dd4d..713297473951 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -788,7 +788,6 @@ int numa_cpu_lookup_table[NR_CPUS];
788cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; 788cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES];
789 789
790#ifdef CONFIG_NEED_MULTIPLE_NODES 790#ifdef CONFIG_NEED_MULTIPLE_NODES
791static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
792 791
793struct mdesc_mblock { 792struct mdesc_mblock {
794 u64 base; 793 u64 base;
@@ -871,7 +870,7 @@ static void __init allocate_node_data(int nid)
871 NODE_DATA(nid) = __va(paddr); 870 NODE_DATA(nid) = __va(paddr);
872 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 871 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
873 872
874 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 873 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
875#endif 874#endif
876 875
877 p = NODE_DATA(nid); 876 p = NODE_DATA(nid);
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 5dfef9fa061a..62fa440678d8 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -42,7 +42,6 @@
42 42
43struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 43struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
44EXPORT_SYMBOL(node_data); 44EXPORT_SYMBOL(node_data);
45static bootmem_data_t node0_bdata;
46 45
47/* 46/*
48 * numa interface - we expect the numa architecture specific code to have 47 * numa interface - we expect the numa architecture specific code to have
@@ -385,7 +384,7 @@ void __init initmem_init(unsigned long start_pfn,
385 for_each_online_node(nid) 384 for_each_online_node(nid)
386 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 385 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
387 386
388 NODE_DATA(0)->bdata = &node0_bdata; 387 NODE_DATA(0)->bdata = &bootmem_node_data[0];
389 setup_bootmem_allocator(); 388 setup_bootmem_allocator();
390} 389}
391 390
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 9782f42dd319..a4dd793d6003 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -23,8 +23,6 @@
23struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 23struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
24EXPORT_SYMBOL(node_data); 24EXPORT_SYMBOL(node_data);
25 25
26static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
27
28struct memnode memnode; 26struct memnode memnode;
29 27
30s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = { 28s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = {
@@ -198,7 +196,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
198 nodedata_phys + pgdat_size - 1); 196 nodedata_phys + pgdat_size - 1);
199 197
200 memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); 198 memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t));
201 NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid]; 199 NODE_DATA(nodeid)->bdata = &bootmem_node_data[nodeid];
202 NODE_DATA(nodeid)->node_start_pfn = start_pfn; 200 NODE_DATA(nodeid)->node_start_pfn = start_pfn;
203 NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn; 201 NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn;
204 202