All of lore.kernel.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@rivosinc.com>
To: linux-riscv@lists.infradead.org
Subject: Re: [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT
Date: Tue, 14 Feb 2023 16:02:48 -0800 (PST)	[thread overview]
Message-ID: <mhng-858f0ba6-5ea1-4f41-b0b1-42f33c09dfe2@palmer-ri-x1c9> (raw)
In-Reply-To: <20230214201358.10647-1-palmer@rivosinc.com>

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

  reply	other threads:[~2023-02-15  0:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 20:13 [PATCH] RISC-V: Guard alternative asm macros with !LINKER_SCRIPT Palmer Dabbelt
2023-02-15  0:02 ` Palmer Dabbelt [this message]
2023-02-15  0:08   ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-858f0ba6-5ea1-4f41-b0b1-42f33c09dfe2@palmer-ri-x1c9 \
    --to=palmer@rivosinc.com \
    --cc=linux-riscv@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.