diff options
Diffstat (limited to 'arch/x86/mm/numa_64.c')
-rw-r--r-- | arch/x86/mm/numa_64.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 95ea1551eebc..62cb634b5cf8 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -86,7 +86,7 @@ static int __init allocate_cachealigned_memnodemap(void) | |||
86 | 86 | ||
87 | addr = 0x8000; | 87 | addr = 0x8000; |
88 | nodemap_size = roundup(sizeof(s16) * memnodemapsize, L1_CACHE_BYTES); | 88 | nodemap_size = roundup(sizeof(s16) * memnodemapsize, L1_CACHE_BYTES); |
89 | nodemap_addr = memblock_find_in_range(addr, max_pfn<<PAGE_SHIFT, | 89 | nodemap_addr = memblock_find_in_range(addr, get_max_mapped(), |
90 | nodemap_size, L1_CACHE_BYTES); | 90 | nodemap_size, L1_CACHE_BYTES); |
91 | if (nodemap_addr == MEMBLOCK_ERROR) { | 91 | if (nodemap_addr == MEMBLOCK_ERROR) { |
92 | printk(KERN_ERR | 92 | printk(KERN_ERR |
@@ -598,11 +598,12 @@ static int __init numa_emulation(unsigned long start_pfn, | |||
598 | * the e820 memory map. | 598 | * the e820 memory map. |
599 | */ | 599 | */ |
600 | remove_all_active_ranges(); | 600 | remove_all_active_ranges(); |
601 | for_each_node_mask(i, node_possible_map) { | 601 | for_each_node_mask(i, node_possible_map) |
602 | memblock_x86_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, | 602 | memblock_x86_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, |
603 | nodes[i].end >> PAGE_SHIFT); | 603 | nodes[i].end >> PAGE_SHIFT); |
604 | init_memory_mapping_high(); | ||
605 | for_each_node_mask(i, node_possible_map) | ||
604 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | 606 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); |
605 | } | ||
606 | setup_physnodes(addr, max_addr, acpi, amd); | 607 | setup_physnodes(addr, max_addr, acpi, amd); |
607 | fake_physnodes(acpi, amd, num_nodes); | 608 | fake_physnodes(acpi, amd, num_nodes); |
608 | numa_init_array(); | 609 | numa_init_array(); |
@@ -658,6 +659,7 @@ void __init initmem_init(unsigned long start_pfn, unsigned long last_pfn, | |||
658 | for (i = 0; i < nr_cpu_ids; i++) | 659 | for (i = 0; i < nr_cpu_ids; i++) |
659 | numa_set_node(i, 0); | 660 | numa_set_node(i, 0); |
660 | memblock_x86_register_active_regions(0, start_pfn, last_pfn); | 661 | memblock_x86_register_active_regions(0, start_pfn, last_pfn); |
662 | init_memory_mapping_high(); | ||
661 | setup_node_bootmem(0, start_pfn << PAGE_SHIFT, last_pfn << PAGE_SHIFT); | 663 | setup_node_bootmem(0, start_pfn << PAGE_SHIFT, last_pfn << PAGE_SHIFT); |
662 | } | 664 | } |
663 | 665 | ||