From 3c18ac87ae45a6679433e4fafb18eadaf77842ff Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 18 Dec 2024 15:05:03 +1100 Subject: [PATCH] fix up for "x86/static-call: provide a way to do very early static-call updates" Signed-off-by: Stephen Rothwell --- arch/x86/kernel/static_call.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/static_call.c b/arch/x86/kernel/static_call.c index 9eed0c144dad51..dca440b18b9f81 100644 --- a/arch/x86/kernel/static_call.c +++ b/arch/x86/kernel/static_call.c @@ -176,7 +176,9 @@ noinstr void __static_call_update_early(void *tramp, void *func) { BUG_ON(system_state != SYSTEM_BOOTING); BUG_ON(!early_boot_irqs_disabled); +#ifdef CONFIG_HAVE_STATIC_CALL_INLINE BUG_ON(static_call_initialized); +#endif __text_gen_insn(tramp, JMP32_INSN_OPCODE, tramp, func, JMP32_INSN_SIZE); sync_core(); }