* [PATCH v2] alpha: Use symbol assignment in SYM_END
@ 2026-11-17 0:07 Linus Walleij
2026-11-17 6:44 ` Magnus Lindholm
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2026-11-17 0:07 UTC (permalink / raw)
To: Richard Henderson, Matt Turner, Magnus Lindholm
Cc: linux-alpha, linux-kernel, kernel test robot, Linus Walleij
Alpha uses the .set directive to select assembler options, so the
symbol assignment emitted by the generic SYM_END macro fails to assemble.
This breaks COMPILE_TEST builds left and right, e.g.:
Error: junk at end of line, first unrecognized character is `,'
Error: .size expression for bcm6846_runner_start does not evaluate to a constant
Override SYM_END to use an ordinary symbol assignment for the calculated
size. Preserve the symbol type, size and local size symbol while leaving
other architectures unchanged.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202611031620.n4ptlpo7-lkp@intel.com/
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
The generic SYM_END uses .set for symbol assignment, but Alpha interprets
.set as an assembler mode directive. Provide an Alpha override using
ordinary assignment.
Tested the unchanged Runner wrapper with an Alpha-targeted GNU assembler
2.46.1: the original header reproduces the reported errors, while the
fixed header assembles without warnings. Symbol sizes and the embedded
Runner bytes were checked. A full Alpha allyesconfig build was not run.
This patch was prepared with LLM assistance.
---
Changes in v2:
- Use __ASSEMBLER__ instead of __ASSEMBLY__, as requested by Thomas Huth.
- Link to v1: https://patch.msgid.link/20261103-alpha-compile-v1-1-9e93e2260a9f@kernel.org
---
arch/alpha/include/asm/linkage.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/alpha/include/asm/linkage.h b/arch/alpha/include/asm/linkage.h
index aa8661fa60dc..275de8ac693b 100644
--- a/arch/alpha/include/asm/linkage.h
+++ b/arch/alpha/include/asm/linkage.h
@@ -6,4 +6,12 @@
#define SYSCALL_ALIAS(alias, name) \
asm ( #alias " = " #name "\n\t.globl " #alias)
+#ifdef __ASSEMBLER__
+/* Alpha uses .set for assembler options, not symbol assignments. */
+#define SYM_END(name, sym_type) \
+ .type name sym_type ASM_NL \
+ .L__sym_size_##name = . - name ASM_NL \
+ .size name, .L__sym_size_##name
+#endif
+
#endif
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261103-alpha-compile-efdde587115c
Best regards,
--
Linus Walleij <linusw@kernel.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] alpha: Use symbol assignment in SYM_END
2026-11-17 0:07 [PATCH v2] alpha: Use symbol assignment in SYM_END Linus Walleij
@ 2026-11-17 6:44 ` Magnus Lindholm
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Lindholm @ 2026-11-17 6:44 UTC (permalink / raw)
To: Linus Walleij
Cc: Richard Henderson, Matt Turner, linux-alpha, linux-kernel,
kernel test robot
Hi Linus,
On Tue, Nov 17, 2026 at 1:07 AM Linus Walleij <linusw@kernel.org> wrote:
>
> Alpha uses the .set directive to select assembler options, so the
> symbol assignment emitted by the generic SYM_END macro fails to assemble.
> This breaks COMPILE_TEST builds left and right, e.g.:
>
> Error: junk at end of line, first unrecognized character is `,'
> Error: .size expression for bcm6846_runner_start does not evaluate to a constant
>
> Override SYM_END to use an ordinary symbol assignment for the calculated
> size. Preserve the symbol type, size and local size symbol while leaving
> other architectures unchanged.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202611031620.n4ptlpo7-lkp@intel.com/
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> The generic SYM_END uses .set for symbol assignment, but Alpha interprets
> .set as an assembler mode directive. Provide an Alpha override using
> ordinary assignment.
>
> Tested the unchanged Runner wrapper with an Alpha-targeted GNU assembler
> 2.46.1: the original header reproduces the reported errors, while the
> fixed header assembles without warnings. Symbol sizes and the embedded
> Runner bytes were checked. A full Alpha allyesconfig build was not run.
>
> This patch was prepared with LLM assistance.
> ---
> Changes in v2:
> - Use __ASSEMBLER__ instead of __ASSEMBLY__, as requested by Thomas Huth.
> - Link to v1: https://patch.msgid.link/20261103-alpha-compile-v1-1-9e93e2260a9f@kernel.org
> ---
> arch/alpha/include/asm/linkage.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/alpha/include/asm/linkage.h b/arch/alpha/include/asm/linkage.h
> index aa8661fa60dc..275de8ac693b 100644
> --- a/arch/alpha/include/asm/linkage.h
> +++ b/arch/alpha/include/asm/linkage.h
> @@ -6,4 +6,12 @@
> #define SYSCALL_ALIAS(alias, name) \
> asm ( #alias " = " #name "\n\t.globl " #alias)
>
> +#ifdef __ASSEMBLER__
> +/* Alpha uses .set for assembler options, not symbol assignments. */
> +#define SYM_END(name, sym_type) \
> + .type name sym_type ASM_NL \
> + .L__sym_size_##name = . - name ASM_NL \
> + .size name, .L__sym_size_##name
> +#endif
> +
> #endif
>
> ---
> base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
> change-id: 20261103-alpha-compile-efdde587115c
>
> Best regards,
> --
> Linus Walleij <linusw@kernel.org>
>
I've already applied v1 as a6424204bb55 ("alpha: Use symbol assignment
in SYM_END"), and it is in my published for-next.
Since v2 only changes the guard from __ASSEMBLY__ to __ASSEMBLER__,
could you send that change as a follow-up patch? That would let me
pick it up without rewriting the existing history.
Thanks,
Magnus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-17 6:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 0:07 [PATCH v2] alpha: Use symbol assignment in SYM_END Linus Walleij
2026-11-17 6:44 ` Magnus Lindholm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.