diff options
-rw-r--r-- | arch/x86/mm/numa_64.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 848231481619..551e3590e5c5 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -233,8 +233,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, | |||
233 | node_set_online(nodeid); | 233 | node_set_online(nodeid); |
234 | } | 234 | } |
235 | 235 | ||
236 | #ifdef CONFIG_FLAT_NODE_MEM_MAP | ||
236 | /* Initialize final allocator for a zone */ | 237 | /* Initialize final allocator for a zone */ |
237 | void __init setup_node_zones(int nodeid) | 238 | static void __init flat_setup_node_zones(int nodeid) |
238 | { | 239 | { |
239 | unsigned long start_pfn, end_pfn, memmapsize, limit; | 240 | unsigned long start_pfn, end_pfn, memmapsize, limit; |
240 | 241 | ||
@@ -250,14 +251,16 @@ void __init setup_node_zones(int nodeid) | |||
250 | */ | 251 | */ |
251 | memmapsize = sizeof(struct page) * (end_pfn-start_pfn); | 252 | memmapsize = sizeof(struct page) * (end_pfn-start_pfn); |
252 | limit = end_pfn << PAGE_SHIFT; | 253 | limit = end_pfn << PAGE_SHIFT; |
253 | #ifdef CONFIG_FLAT_NODE_MEM_MAP | 254 | |
254 | NODE_DATA(nodeid)->node_mem_map = | 255 | NODE_DATA(nodeid)->node_mem_map = |
255 | __alloc_bootmem_core(NODE_DATA(nodeid)->bdata, | 256 | __alloc_bootmem_core(NODE_DATA(nodeid)->bdata, |
256 | memmapsize, SMP_CACHE_BYTES, | 257 | memmapsize, SMP_CACHE_BYTES, |
257 | round_down(limit - memmapsize, PAGE_SIZE), | 258 | round_down(limit - memmapsize, PAGE_SIZE), |
258 | limit); | 259 | limit); |
259 | #endif | ||
260 | } | 260 | } |
261 | #else | ||
262 | #define flat_setup_node_zones(i) do {} while (0) | ||
263 | #endif | ||
261 | 264 | ||
262 | /* | 265 | /* |
263 | * There are unfortunately some poorly designed mainboards around that | 266 | * There are unfortunately some poorly designed mainboards around that |
@@ -581,7 +584,7 @@ void __init paging_init(void) | |||
581 | sparse_init(); | 584 | sparse_init(); |
582 | 585 | ||
583 | for_each_online_node(i) | 586 | for_each_online_node(i) |
584 | setup_node_zones(i); | 587 | flat_setup_node_zones(i); |
585 | 588 | ||
586 | free_area_init_nodes(max_zone_pfns); | 589 | free_area_init_nodes(max_zone_pfns); |
587 | } | 590 | } |