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>
__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());