x86, hotplug: Wake up CPU0 via NMI instead of INIT, SIPI, SIPI
A message that is not in the archive (sent off-list or not yet received): [email protected]
Commit-ID: e1c467e69040c3be68959332959c07fb3d818e87 Gitweb: http://git.kernel.org/tip/e1c467e69040c3be68959332959c07fb3d818e87 Author: Fenghua Yu <[email protected]> AuthorDate: Wed, 14 Nov 2012 04:36:53 -0800 Committer: H. Peter Anvin <[email protected]> CommitDate: Wed, 14 Nov 2012 15:28:03 -0800
x86, hotplug: Wake up CPU0 via NMI instead of INIT, SIPI, SIPI
Instead of waiting for STARTUP after INITs, BSP will execute the BIOS boot-strap code which is not a desired behavior for waking up BSP. To avoid the boot-strap code, wake up CPU0 by NMI instead.
This works to wake up soft offlined CPU0 only. If CPU0 is hard offlined (i.e. physically hot removed and then hot added), NMI won't wake it up. We'll change this code in the future to wake up hard offlined CPU0 if real platform and request are available.
AP is still waken up as before by INIT, SIPI, SIPI sequence.
Signed-off-by Fenghua Yu <[email protected]>
Signed-off-by H. Peter Anvin <[email protected]>
--- arch/x86/include/asm/cpu.h | 1 + arch/x86/kernel/smpboot.c | 111 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 105 insertions(+), 7 deletions(-)
arch/x86/include/asm/cpu.h +1 -0
@@ -28,6 +28,7 @@ struct x86_cpu {#ifdef CONFIG_HOTPLUG_CPU extern int arch_register_cpu (int num);extern void arch_unregister_cpu (int ); +extern void __cpuinit start_cpu0 (void );#endif DECLARE_PER_CPU (int, cpu_state);
arch/x86/kernel/smpboot.c +104 -7
200 lines not on this page · raw message