Skip to contentSkip to conversation

linux-next: build failure after merge of the origin tree

PATCH Stephen Rothwell 2 participants 2 messages Dec 18, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 9eed0c144dad..dca440b18b9f 100644
@@ -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
#1 lore raw
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_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.

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"

---
  arch/x86/kernel/static_call.c | 2 ++
  1 file changed, 2 insertions(+)
arch/x86/kernel/static_call.c +2 -0
index 9eed0c144dad..dca440b18b9f 100644
@@ -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();
  }