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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18.12.24 05:13, Stephen Rothwell wrote:
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.

Yeah, it doesn't cover all cases. I have sent a patch fixing it properly
(famous last words).


Juergen


From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
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 <sfr@xxxxxxxxxxxxxxxx>
---
  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 9eed0c144dad..dca440b18b9f 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();
  }

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux