From: Alexandre Ghiti <alex@ghiti.fr>
To: Andrew Jones <ajones@ventanamicro.com>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
conor.dooley@microchip.com, oe-kbuild-all@lists.linux.dev,
charlie@rivosinc.com, samuel.holland@sifive.com,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] riscv: Provide all alternative macros all the time
Date: Mon, 14 Apr 2025 15:05:41 +0200 [thread overview]
Message-ID: <6b0d2b2f-5ccc-4337-aeaf-d18ed6e6097f@ghiti.fr> (raw)
In-Reply-To: <20250414120947.135173-2-ajones@ventanamicro.com>
Hi Drew,
On 14/04/2025 14:09, Andrew Jones wrote:
> We need to provide all six forms of the alternative macros
> (ALTERNATIVE, ALTERNATIVE_2, _ALTERNATIVE_CFG, _ALTERNATIVE_CFG_2,
> __ALTERNATIVE_CFG, __ALTERNATIVE_CFG_2) for all four cases derived
> from the two ifdefs (RISCV_ALTERNATIVE, __ASSEMBLY__) in order to
> ensure all configs can compile. Define this missing ones and ensure
> all are defined to consume all parameters passed.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202504130710.3IKz6Ibs-lkp@intel.com/
> Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> ---
> arch/riscv/include/asm/alternative-macros.h | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/arch/riscv/include/asm/alternative-macros.h b/arch/riscv/include/asm/alternative-macros.h
> index 721ec275ce57..231d777d936c 100644
> --- a/arch/riscv/include/asm/alternative-macros.h
> +++ b/arch/riscv/include/asm/alternative-macros.h
> @@ -115,24 +115,19 @@
> \old_c
> .endm
>
> -#define _ALTERNATIVE_CFG(old_c, ...) \
> - ALTERNATIVE_CFG old_c
> -
> -#define _ALTERNATIVE_CFG_2(old_c, ...) \
> - ALTERNATIVE_CFG old_c
> +#define __ALTERNATIVE_CFG(old_c, ...) ALTERNATIVE_CFG old_c
> +#define __ALTERNATIVE_CFG_2(old_c, ...) ALTERNATIVE_CFG old_c
>
> #else /* !__ASSEMBLY__ */
>
> -#define __ALTERNATIVE_CFG(old_c) \
> - old_c "\n"
> +#define __ALTERNATIVE_CFG(old_c, ...) old_c "\n"
> +#define __ALTERNATIVE_CFG_2(old_c, ...) old_c "\n"
>
> -#define _ALTERNATIVE_CFG(old_c, ...) \
> - __ALTERNATIVE_CFG(old_c)
> +#endif /* __ASSEMBLY__ */
>
> -#define _ALTERNATIVE_CFG_2(old_c, ...) \
> - __ALTERNATIVE_CFG(old_c)
> +#define _ALTERNATIVE_CFG(old_c, ...) __ALTERNATIVE_CFG(old_c)
> +#define _ALTERNATIVE_CFG_2(old_c, ...) __ALTERNATIVE_CFG_2(old_c)
>
> -#endif /* __ASSEMBLY__ */
> #endif /* CONFIG_RISCV_ALTERNATIVE */
>
> /*
I could not find the right Fixes tag, so unless you have one, I'll add
the commit pointed at by kernel test robot.
You can add:
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Thanks for looking into this!
Alex
next prev parent reply other threads:[~2025-04-14 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 12:09 Andrew Jones
2025-04-14 13:05 ` Alexandre Ghiti [this message]
2025-04-16 18:42 ` patchwork-bot+linux-riscv
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=6b0d2b2f-5ccc-4337-aeaf-d18ed6e6097f@ghiti.fr \
--to=alex@ghiti.fr \
--cc=ajones@ventanamicro.com \
--cc=charlie@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=samuel.holland@sifive.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®