Re: [tip:master 19/19] include/linux/irq-entry-common.h:201:2: error: unexpected token
From: Mark Rutland
Date: Wed Jul 02 2025 - 10:16:55 EST
On Wed, Jul 02, 2025 at 03:24:15PM +0200, Borislav Petkov wrote:
> On Wed, Jul 02, 2025 at 02:16:15PM +0100, Mark Rutland wrote:
> > Sounds like a plan.
>
> As we figured out on IRC:
>
> https://lore.kernel.org/all/20250616-loongarch-fix-warn-cond-llvm-ias-v1-1-6c6d90bb4466@xxxxxxxxxx/
>
> "clang's integrated assembler only supports concatenating strings with
> '.ascii'. There was discussion of allowing '.string' / '.asciz' but it
> was decided against [1] because it was undesirable to match the behavior
> of released binutils at the time, where"
>
> and this seems to fix it here:
>
> ---
> diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h
> index a185855ab158..46d9eb64bd18 100644
> --- a/arch/s390/include/asm/bug.h
> +++ b/arch/s390/include/asm/bug.h
> @@ -9,7 +9,7 @@
> #else
> #define __BUGVERBOSE_LOCATION(file, line) \
> .pushsection .rodata.str, "aMS", @progbits, 1; \
> - 10002: .string file; \
> + 10002: .ascii file; \
> .popsection; \
> \
> .long 10002b - .; \
>
IIUC this also needs a trailing "\0" as per the link above, or this
won't get a NUL-terminator (but will build just fine).
While looking at this I spotted that arm64 doesn't propagate the
cond_str down to __BUGVERBOSE_LOCATION(), which is why we don't
encounter the same problem today.
We should probably fix that, but it looks like it might need some more
header wrangling for ASM_BUG(). I thought we'd split that out to avoid
circular header dependencies, but I could be mistaken.
Mark.
>
> I leave it to Mr. Z to sort out.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette