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

From: Chris Down
Date: Tue Jul 20 2021 - 08:30:36 EST


Hey folks,

Naresh Kamboju writes:
On Tue, 20 Jul 2021 at 13:13, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:

Hi all,

After merging the printk tree, today's linux-next build (mips allnoconfig)
failed like this:

arch/mips/kernel/genex.o: In function `handle_mcheck_int':
(.text+0x190c): undefined reference to `printk'
arch/mips/kernel/genex.o: In function `handle_reserved_int':
(.text+0x1c8c): undefined reference to `printk'

Caused by commit

337015573718 ("printk: Userspace format indexing support")

Following MIPS builds failed at our end due the reported problem.

Thanks: missed this as I made sure to change all .S files to use _printk, but this is in a .h file included in a .S file.

Here's what's needed. :-)

diff --git arch/mips/include/asm/asm.h arch/mips/include/asm/asm.h
index ea4b62ece336..2f8ce94ebaaf 100644
--- arch/mips/include/asm/asm.h
+++ arch/mips/include/asm/asm.h
@@ -114,7 +114,7 @@ symbol = value
.set push; \
.set reorder; \
PTR_LA a0, 8f; \
- jal printk; \
+ jal _printk; \
.set pop; \
TEXT(string)
#else