aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <Yinghai.Lu@Sun.COM>2008-02-19 18:35:54 -0500
committerIngo Molnar <mingo@elte.hu>2008-03-04 11:10:12 -0500
commit7c9e92b6cdc9937eee53600e5d49a25e421463dd (patch)
treec034c1843625d87444fab06fb58654da954684c2 /arch
parent18a8622101154277df97e24097ed17aace84fa3a (diff)
x86: not set node to cpu_to_node if the node is not online
resolve boot problem reported by Mel Gorman: http://lkml.org/lkml/2008/2/13/404 init_cpu_to_node will use cpu->apic (from MADT or mptable) and apic->node(from SRAT or AMD config space with k8_bus_64.c) to have cpu->node mapping, and later identify_cpu will overwrite them again...(with nearby_node...) this patch checks if the node is online, otherwise it will not update cpu_node map. so keep cpu_node map to online node before identify_cpu..., to prevent possible error. Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/numa_64.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 59898fb0a4aa..8ccfee10f5b5 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -622,13 +622,17 @@ void __init init_cpu_to_node(void)
622 int i; 622 int i;
623 623
624 for (i = 0; i < NR_CPUS; i++) { 624 for (i = 0; i < NR_CPUS; i++) {
625 int node;
625 u16 apicid = x86_cpu_to_apicid_init[i]; 626 u16 apicid = x86_cpu_to_apicid_init[i];
626 627
627 if (apicid == BAD_APICID) 628 if (apicid == BAD_APICID)
628 continue; 629 continue;
629 if (apicid_to_node[apicid] == NUMA_NO_NODE) 630 node = apicid_to_node[apicid];
631 if (node == NUMA_NO_NODE)
630 continue; 632 continue;
631 numa_set_node(i, apicid_to_node[apicid]); 633 if (!node_online(node))
634 continue;
635 numa_set_node(i, node);
632 } 636 }
633} 637}
634 638