aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-01-11 10:41:01 +0000
committerKeir Fraser <keir@xen.org>2011-01-11 10:41:01 +0000
commitc130c86b6ed64d370ac3f3b4cb7e8057032a6071 (patch)
tree2be9815acfcff897807fbdd44fdbba26b542f7f8
parent8f7987fd0a5316e3c20b31a29f0b73abd6f549ae (diff)
downloadxen-c130c86b6ed64d370ac3f3b4cb7e8057032a6071.tar.gz
xen-c130c86b6ed64d370ac3f3b4cb7e8057032a6071.tar.bz2
xen-c130c86b6ed64d370ac3f3b4cb7e8057032a6071.zip
x86: don't crash when a CPU cannot be brought online during boot
x86_cpu_to_apicid[] gets set to BAD_APICID when bringup of a secondary CPU fails, yet srat_detect_node() wants to use this as array index. Signed-off-by: Jan Beulich <jbeulich@novell.com>
-rw-r--r--xen/arch/x86/setup.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 553a5f5d25..c34b680dfd 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1098,10 +1098,13 @@ void __init __start_xen(unsigned long mbi_p)
__cpu_up(i);
}
- /* Set up cpu_to_node[]. */
- srat_detect_node(i);
- /* Set up node_to_cpumask based on cpu_to_node[]. */
- numa_add_cpu(i);
+ if ( cpu_online(i) )
+ {
+ /* Set up cpu_to_node[]. */
+ srat_detect_node(i);
+ /* Set up node_to_cpumask based on cpu_to_node[]. */
+ numa_add_cpu(i);
+ }
}
printk("Brought up %ld CPUs\n", (long)num_online_cpus());