x86/smpboot: Make TSC synchronization function call based
authorThomas Gleixner <tglx@linutronix.de>
Fri, 12 May 2023 21:07:17 +0000 (23:07 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 15 May 2023 11:44:53 +0000 (13:44 +0200)
commit9d349d47f0e39b4d1b68793ded2459daa1f948f0
treed3f00d8c37867b3b98609ce9402cb87f29a8ab68
parentd4f28f07c2fe736bce8ca415a86fb74c629200f3
x86/smpboot: Make TSC synchronization function call based

Spin-waiting on the control CPU until the AP reaches the TSC
synchronization is just a waste especially in the case that there is no
synchronization required.

As the synchronization has to run with interrupts disabled the control CPU
part can just be done from a SMP function call. The upcoming AP issues that
call async only in the case that synchronization is required.

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/20230512205256.148255496@linutronix.de
arch/x86/include/asm/tsc.h
arch/x86/kernel/smpboot.c
arch/x86/kernel/tsc_sync.c