aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-02-15 22:13:50 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-19 20:03:34 -0500
commitf018b36f3e1f21318066de8d01740d30e38b03d5 (patch)
treea893342f794d08a2ee79cbe960b312c54cb47e44 /arch
parent2b9a32edba3af9ad4ccb23574bea0cc34455dc43 (diff)
[PATCH] powerpc: Don't start secondary CPUs in a UP && KEXEC kernel
Because smp_release_cpus() is built for SMP || KEXEC, it's not safe to unconditionally call it from setup_system(). On a UP && KEXEC kernel we'll start up the secondary CPUs which will then go beserk and we die. Simple fix is to conditionally call smp_release_cpus() in setup_system(). With that in place we don't need the dummy definition of smp_release_cpus() because all call sites are #ifdef'ed either SMP or KEXEC. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/setup_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index a717dff695ef..f96c49b03ba0 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -311,8 +311,6 @@ void smp_release_cpus(void)
311 311
312 DBG(" <- smp_release_cpus()\n"); 312 DBG(" <- smp_release_cpus()\n");
313} 313}
314#else
315#define smp_release_cpus()
316#endif /* CONFIG_SMP || CONFIG_KEXEC */ 314#endif /* CONFIG_SMP || CONFIG_KEXEC */
317 315
318/* 316/*
@@ -473,10 +471,12 @@ void __init setup_system(void)
473 check_smt_enabled(); 471 check_smt_enabled();
474 smp_setup_cpu_maps(); 472 smp_setup_cpu_maps();
475 473
474#ifdef CONFIG_SMP
476 /* Release secondary cpus out of their spinloops at 0x60 now that 475 /* Release secondary cpus out of their spinloops at 0x60 now that
477 * we can map physical -> logical CPU ids 476 * we can map physical -> logical CPU ids
478 */ 477 */
479 smp_release_cpus(); 478 smp_release_cpus();
479#endif
480 480
481 printk("Starting Linux PPC64 %s\n", system_utsname.version); 481 printk("Starting Linux PPC64 %s\n", system_utsname.version);
482 482