From: Suresh Siddha More fixes in the failure cases and a small cleanup in numa emulation case. Signed-off-by: Suresh Siddha Acked-by: David Rientjes Signed-off-by: Andrew Morton --- arch/x86_64/mm/numa.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN arch/x86_64/mm/numa.c~x86_64-set-node_possible_map-at-runtime-fix-2 arch/x86_64/mm/numa.c --- a/arch/x86_64/mm/numa.c~x86_64-set-node_possible_map-at-runtime-fix-2 +++ a/arch/x86_64/mm/numa.c @@ -295,7 +295,6 @@ static int __init setup_node_range(int n ret = -1; } nodes[nid].end = *addr; - node_set_online(nid); node_set(nid, node_possible_map); printk(KERN_INFO "Faking node %d at %016Lx-%016Lx (%LuMB)\n", nid, nodes[nid].start, nodes[nid].end, @@ -480,7 +479,7 @@ out: * SRAT. */ remove_all_active_ranges(); - for_each_online_node(i) { + for_each_node_mask(i, node_possible_map) { e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, nodes[i].end >> PAGE_SHIFT); setup_node_bootmem(i, nodes[i].start, nodes[i].end); @@ -507,11 +506,13 @@ void __init numa_initmem_init(unsigned l if (!numa_off && !acpi_scan_nodes(start_pfn << PAGE_SHIFT, end_pfn << PAGE_SHIFT)) return; + nodes_clear(node_possible_map); #endif #ifdef CONFIG_K8_NUMA if (!numa_off && !k8_scan_nodes(start_pfn<