x86/smpboot: Enable split CPU startup
authorThomas Gleixner <tglx@linutronix.de>
Fri, 12 May 2023 21:07:46 +0000 (23:07 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 15 May 2023 11:45:01 +0000 (13:45 +0200)
commit8b5a0f957cc5ca1f68486163d4da4683be3b47aa
tree36d328208d183a30dc52126496e2bd16a498f336
parenta631be92b996c5db9b368e8b96305d22fb8c4180
x86/smpboot: Enable split CPU startup

The x86 CPU bringup state currently does AP wake-up, wait for AP to
respond and then release it for full bringup.

It is safe to be split into a wake-up and and a separate wait+release
state.

Provide the required functions and enable the split CPU bringup, which
prepares for parallel bringup, where the bringup of the non-boot CPUs takes
two iterations: One to prepare and wake all APs and the second to wait and
release them. Depending on timing this can eliminate the wait time
completely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Tested-by: Helge Deller <deller@gmx.de> # parisc
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> # Steam Deck
Link: https://lore.kernel.org/r/20230512205257.133453992@linutronix.de
arch/x86/Kconfig
arch/x86/include/asm/smp.h
arch/x86/kernel/smp.c
arch/x86/kernel/smpboot.c
arch/x86/xen/smp_pv.c