summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/realmode.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2023-05-12 23:07:53 +0200
committerPeter Zijlstra <peterz@infradead.org>2023-05-15 13:45:03 +0200
commitf6f1ae9128d2a080ecdd55f85e8a0ca3ed1d58eb (patch)
tree4555b22acd29516c4d70dcd7ec0d2c412b441730 /arch/x86/include/asm/realmode.h
parentbea629d57d006733d155bdb65ba4867788da69b6 (diff)
x86/smpboot: Implement a bit spinlock to protect the realmode stack
Parallel AP bringup requires that the APs can run fully parallel through the early startup code including the real mode trampoline. To prepare for this implement a bit-spinlock to serialize access to the real mode stack so that parallel upcoming APs are not going to corrupt each others stack while going through the real mode startup code. Co-developed-by: David Woodhouse <dwmw@amazon.co.uk> 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/20230512205257.355425551@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/realmode.h')
-rw-r--r--arch/x86/include/asm/realmode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h
index f6a1737c77be..87e5482acd0d 100644
--- a/arch/x86/include/asm/realmode.h
+++ b/arch/x86/include/asm/realmode.h
@@ -52,6 +52,7 @@ struct trampoline_header {
u64 efer;
u32 cr4;
u32 flags;
+ u32 lock;
#endif
};
@@ -64,6 +65,8 @@ extern unsigned long initial_stack;
extern unsigned long initial_vc_handler;
#endif
+extern u32 *trampoline_lock;
+
extern unsigned char real_mode_blob[];
extern unsigned char real_mode_relocs[];