linux-next: build failure after merge of the origin tree
Subsystems (3)
Hi all,
After merging the origin tree, today's linux-next build (i386 defconfig) failed like this:
x86_64-linux-gnu-ld: arch/x86/kernel/static_call.o: in function `__static_call_update_early':
static_call.c:(.noinstr.text+0x15): undefined reference to `static_call_initialized'
In case it matters, this is a PowerPC hosted cross build.
Presumably caused by commit
0ef8047b737d ("x86/static-call: provide a way to do very early static-call updates")
static_call_initialized is defined in kernel/static_call_inline.c which is only built if HAVE_STATIC_CALL_INLINE is defined and that is only selected if HAVE_OBJTOOL is defined and that is only selected if X86_64 is defined.
I have applied the following hack for today - probably something better can be done.
From: Stephen Rothwell <[email protected]>
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"
--- arch/x86/kernel/static_call.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/kernel/static_call.c +2 -0
@@ -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 (); }
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 12 lines · Stephen Rothwell
Hi all,
After merging the origin tree, today's linux-next build (i386 defconfig) failed like this:
x86_64-linux-gnu-ld:
arch/x86/kernel/static_call.o: in function `__static_call_update_early':
static_call.c:(.noinstr.text+0x15): undefined reference to `static_call_initialized'In case it matters, this is a PowerPC hosted cross build.
Presumably caused by commit
Quoted 8 lines
0ef8047b737d("x86/static-call: provide a way to do very early static-call updates")
static_call_initializedis defined inkernel/static_call_inline.cwhich is only built ifHAVE_STATIC_CALL_INLINEis defined and that is only selected ifHAVE_OBJTOOLis defined and that is only selected ifX86_64is defined.I have applied the following hack for today - probably something better can be done.
Yeah, it doesn't cover all cases. I have sent a patch fixing it properly (famous last words).
Juergen
Quoted 25 lines
From: Stephen Rothwell <[email protected]>
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 <[email protected]>--- arch/x86/kernel/static_call.c | 2 ++ 1 file changed, 2 insertions(+)arch/x86/kernel/static_call.c +2
-0@@ -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 (); }