* [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT
@ 2023-02-14 20:13 Palmer Dabbelt
2023-02-15 0:02 ` Palmer Dabbelt
0 siblings, 1 reply; 3+ messages in thread
From: Palmer Dabbelt @ 2023-02-14 20:13 UTC (permalink / raw)
To: linux-riscv; +Cc: Palmer Dabbelt
Without this I get a handful of .macro related directives that trip up
LD.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
I'm not sure when this started failing, but I recently tried a build on
my local machine (with crossdev-based toolchains) and it failed.
---
arch/riscv/include/asm/alternative-macros.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h
index cc6a81c00f2f..afc87528cf71 100644
--- a/arch/riscv/include/asm/alternative-macros.h
+++ b/arch/riscv/include/asm/alternative-macros.h
@@ -6,6 +6,8 @@
#ifdef __ASSEMBLY__
+#ifndef LINKER_SCRIPT
+
.macro ALT_ENTRY oldptr newptr vendor_id errata_id new_len
.4byte \oldptr - .
.4byte \newptr - .
@@ -53,6 +55,8 @@
#define __ALTERNATIVE_CFG(...) ALTERNATIVE_CFG __VA_ARGS__
#define __ALTERNATIVE_CFG_2(...) ALTERNATIVE_CFG_2 __VA_ARGS__
+#endif /* LINKER_SCRIPT */
+
#else /* !__ASSEMBLY__ */
#include <asm/asm.h>
--
2.39.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT
2023-02-14 20:13 [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT Palmer Dabbelt
@ 2023-02-15 0:02 ` Palmer Dabbelt
2023-02-15 0:08 ` Conor Dooley
0 siblings, 1 reply; 3+ messages in thread
From: Palmer Dabbelt @ 2023-02-15 0:02 UTC (permalink / raw)
To: linux-riscv
On Tue, 14 Feb 2023 12:13:58 PST (-0800), Palmer Dabbelt wrote:
> Without this I get a handful of .macro related directives that trip up
> LD.
>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> ---
> I'm not sure when this started failing, but I recently tried a build on
> my local machine (with crossdev-based toolchains) and it failed.
It's actually just because I had
https://lore.kernel.org/all/20221216062109.865573-3-panqinglin2020@iscas.ac.cn/
applied, I'll squash this in if that's OK with folks over there.
> ---
> arch/riscv/include/asm/alternative-macros.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h
> index cc6a81c00f2f..afc87528cf71 100644
> --- a/arch/riscv/include/asm/alternative-macros.h
> +++ b/arch/riscv/include/asm/alternative-macros.h
> @@ -6,6 +6,8 @@
>
> #ifdef __ASSEMBLY__
>
> +#ifndef LINKER_SCRIPT
> +
> .macro ALT_ENTRY oldptr newptr vendor_id errata_id new_len
> .4byte \oldptr - .
> .4byte \newptr - .
> @@ -53,6 +55,8 @@
> #define __ALTERNATIVE_CFG(...) ALTERNATIVE_CFG __VA_ARGS__
> #define __ALTERNATIVE_CFG_2(...) ALTERNATIVE_CFG_2 __VA_ARGS__
>
> +#endif /* LINKER_SCRIPT */
> +
> #else /* !__ASSEMBLY__ */
>
> #include <asm/asm.h>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT
2023-02-15 0:02 ` Palmer Dabbelt
@ 2023-02-15 0:08 ` Conor Dooley
0 siblings, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2023-02-15 0:08 UTC (permalink / raw)
To: Palmer Dabbelt; +Cc: linux-riscv
[-- Attachment #1.1: Type: text/plain, Size: 688 bytes --]
On Tue, Feb 14, 2023 at 04:02:48PM -0800, Palmer Dabbelt wrote:
> On Tue, 14 Feb 2023 12:13:58 PST (-0800), Palmer Dabbelt wrote:
> > Without this I get a handful of .macro related directives that trip up
> > LD.
> >
> > Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> > ---
> > I'm not sure when this started failing, but I recently tried a build on
> > my local machine (with crossdev-based toolchains) and it failed.
>
> It's actually just because I had https://lore.kernel.org/all/20221216062109.865573-3-panqinglin2020@iscas.ac.cn/
> applied, I'll squash this in if that's OK with folks over there.
Since I had left on ack on that series, it's fine by me...
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-15 0:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 20:13 [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT Palmer Dabbelt
2023-02-15 0:02 ` Palmer Dabbelt
2023-02-15 0:08 ` Conor Dooley
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.