summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-02-16 06:13:50 +0300
committerPaul Mackerras <paulus@samba.org>2006-02-20 04:03:34 +0300
commitf018b36f3e1f21318066de8d01740d30e38b03d5 (patch)
treea893342f794d08a2ee79cbe960b312c54cb47e44 /arch/powerpc
parent2b9a32edba3af9ad4ccb23574bea0cc34455dc43 (diff)
downloadlinux-f018b36f3e1f21318066de8d01740d30e38b03d5.tar.xz
[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/powerpc')
-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)
DBG(" <- smp_release_cpus()\n");
}
-#else
-#define smp_release_cpus()
#endif /* CONFIG_SMP || CONFIG_KEXEC */
/*
@@ -473,10 +471,12 @@ void __init setup_system(void)
check_smt_enabled();
smp_setup_cpu_maps();
+#ifdef CONFIG_SMP
/* Release secondary cpus out of their spinloops at 0x60 now that
* we can map physical -> logical CPU ids
*/
smp_release_cpus();
+#endif
printk("Starting Linux PPC64 %s\n", system_utsname.version);