[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>
This commit is contained in:
parent
2b9a32edba
commit
f018b36f3e
1 changed files with 2 additions and 2 deletions
|
@ -311,8 +311,6 @@ void smp_release_cpus(void)
|
||||||
|
|
||||||
DBG(" <- smp_release_cpus()\n");
|
DBG(" <- smp_release_cpus()\n");
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
#define smp_release_cpus()
|
|
||||||
#endif /* CONFIG_SMP || CONFIG_KEXEC */
|
#endif /* CONFIG_SMP || CONFIG_KEXEC */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -473,10 +471,12 @@ void __init setup_system(void)
|
||||||
check_smt_enabled();
|
check_smt_enabled();
|
||||||
smp_setup_cpu_maps();
|
smp_setup_cpu_maps();
|
||||||
|
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
/* Release secondary cpus out of their spinloops at 0x60 now that
|
/* Release secondary cpus out of their spinloops at 0x60 now that
|
||||||
* we can map physical -> logical CPU ids
|
* we can map physical -> logical CPU ids
|
||||||
*/
|
*/
|
||||||
smp_release_cpus();
|
smp_release_cpus();
|
||||||
|
#endif
|
||||||
|
|
||||||
printk("Starting Linux PPC64 %s\n", system_utsname.version);
|
printk("Starting Linux PPC64 %s\n", system_utsname.version);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue