diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2023-05-12 23:07:11 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-05-15 13:44:51 +0200 |
commit | 2b3be65d2e4f4bb9358b039b99ad1a391dd3c311 (patch) | |
tree | 28514eae3117a87aa89b2c698f65d83fb538b1a2 /arch/x86/kernel/nmi_selftest.c | |
parent | c7f15dd3f0e9f1d12d1ae21f0bbd61302ef3abcf (diff) |
x86/smpboot: Split up native_cpu_up() into separate phases and document them
There are four logical parts to what native_cpu_up() does on the BSP (or
on the controlling CPU for a later hotplug):
1) Wake the AP by sending the INIT/SIPI/SIPI sequence.
2) Wait for the AP to make it as far as wait_for_master_cpu() which
sets that CPU's bit in cpu_initialized_mask, then sets the bit in
cpu_callout_mask to let the AP proceed through cpu_init().
3) Wait for the AP to finish cpu_init() and get as far as the
smp_callin() call, which sets that CPU's bit in cpu_callin_mask.
4) Perform the TSC synchronization and wait for the AP to actually
mark itself online in cpu_online_mask.
In preparation to allow these phases to operate in parallel on multiple
APs, split them out into separate functions and document the interactions
a little more clearly in both the BP and AP code paths.
No functional change intended.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
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/20230512205255.928917242@linutronix.de
Diffstat (limited to 'arch/x86/kernel/nmi_selftest.c')
0 files changed, 0 insertions, 0 deletions