diff options
Diffstat (limited to 'arch/x86/mm/numa_64.c')
-rw-r--r-- | arch/x86/mm/numa_64.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 02f13cb99bc2..a20e17059afd 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -198,11 +198,13 @@ static void * __init early_node_mem(int nodeid, unsigned long start, | |||
198 | void __init | 198 | void __init |
199 | setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) | 199 | setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) |
200 | { | 200 | { |
201 | unsigned long start_pfn, last_pfn, bootmap_pages, bootmap_size; | 201 | unsigned long start_pfn, last_pfn, nodedata_phys; |
202 | const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE); | 202 | const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE); |
203 | unsigned long bootmap_start, nodedata_phys; | ||
204 | void *bootmap; | ||
205 | int nid; | 203 | int nid; |
204 | #ifndef CONFIG_NO_BOOTMEM | ||
205 | unsigned long bootmap_start, bootmap_pages, bootmap_size; | ||
206 | void *bootmap; | ||
207 | #endif | ||
206 | 208 | ||
207 | if (!end) | 209 | if (!end) |
208 | return; | 210 | return; |
@@ -216,7 +218,7 @@ setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) | |||
216 | 218 | ||
217 | start = roundup(start, ZONE_ALIGN); | 219 | start = roundup(start, ZONE_ALIGN); |
218 | 220 | ||
219 | printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid, | 221 | printk(KERN_INFO "Initmem setup node %d %016lx-%016lx\n", nodeid, |
220 | start, end); | 222 | start, end); |
221 | 223 | ||
222 | start_pfn = start >> PAGE_SHIFT; | 224 | start_pfn = start >> PAGE_SHIFT; |
@@ -235,10 +237,13 @@ setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) | |||
235 | printk(KERN_INFO " NODE_DATA(%d) on node %d\n", nodeid, nid); | 237 | printk(KERN_INFO " NODE_DATA(%d) on node %d\n", nodeid, nid); |
236 | 238 | ||
237 | memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); | 239 | memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); |
238 | NODE_DATA(nodeid)->bdata = &bootmem_node_data[nodeid]; | 240 | NODE_DATA(nodeid)->node_id = nodeid; |
239 | NODE_DATA(nodeid)->node_start_pfn = start_pfn; | 241 | NODE_DATA(nodeid)->node_start_pfn = start_pfn; |
240 | NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn; | 242 | NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn; |
241 | 243 | ||
244 | #ifndef CONFIG_NO_BOOTMEM | ||
245 | NODE_DATA(nodeid)->bdata = &bootmem_node_data[nodeid]; | ||
246 | |||
242 | /* | 247 | /* |
243 | * Find a place for the bootmem map | 248 | * Find a place for the bootmem map |
244 | * nodedata_phys could be on other nodes by alloc_bootmem, | 249 | * nodedata_phys could be on other nodes by alloc_bootmem, |
@@ -275,6 +280,7 @@ setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) | |||
275 | printk(KERN_INFO " bootmap(%d) on node %d\n", nodeid, nid); | 280 | printk(KERN_INFO " bootmap(%d) on node %d\n", nodeid, nid); |
276 | 281 | ||
277 | free_bootmem_with_active_regions(nodeid, end); | 282 | free_bootmem_with_active_regions(nodeid, end); |
283 | #endif | ||
278 | 284 | ||
279 | node_set_online(nodeid); | 285 | node_set_online(nodeid); |
280 | } | 286 | } |
@@ -733,6 +739,10 @@ unsigned long __init numa_free_all_bootmem(void) | |||
733 | for_each_online_node(i) | 739 | for_each_online_node(i) |
734 | pages += free_all_bootmem_node(NODE_DATA(i)); | 740 | pages += free_all_bootmem_node(NODE_DATA(i)); |
735 | 741 | ||
742 | #ifdef CONFIG_NO_BOOTMEM | ||
743 | pages += free_all_memory_core_early(MAX_NUMNODES); | ||
744 | #endif | ||
745 | |||
736 | return pages; | 746 | return pages; |
737 | } | 747 | } |
738 | 748 | ||