[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e270067-cd2d-ecd0-512b-5dce4865fa4c@sholland.org>
Date: Sat, 9 Sep 2023 16:20:41 -0500
From: Samuel Holland <samuel@...lland.org>
To: Jiexun Wang <wangjiexun@...ylab.org>
Cc: guoren@...nel.org, paul.walmsley@...ive.com, palmer@...belt.com,
aou@...s.berkeley.edu, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, falcon@...ylab.org,
jszhang@...nel.org, tglx@...utronix.de, conor@...nel.org
Subject: Re: [PATCH v2] RISC-V: Fix use of non existent
CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK
Hi,
The patch is correct, though the subject isn't quite accurate.
CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK exists; it is defined in arch/Kconfig.
It's just the wrong option to use to guard the function definition.
On 9/6/23 07:32, Jiexun Wang wrote:
> If configuration options SOFTIRQ_ON_OWN_STACK and PREEMPT_RT
> are enabled simultaneously under RISC-V architecture,
> it will result in a compilation failure:
>
> arch/riscv/kernel/irq.c:64:6: error: redefinition of 'do_softirq_own_stack'
> 64 | void do_softirq_own_stack(void)
> | ^~~~~~~~~~~~~~~~~~~~
> In file included from ./arch/riscv/include/generated/asm/softirq_stack.h:1,
> from arch/riscv/kernel/irq.c:15:
> ./include/asm-generic/softirq_stack.h:8:20: note: previous definition of 'do_softirq_own_stack' was here
> 8 | static inline void do_softirq_own_stack(void)
> | ^~~~~~~~~~~~~~~~~~~~
>
> After changing CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK to CONFIG_SOFTIRQ_ON_OWN_STACK,
> compilation can be successful.
>
> Fixes: dd69d07a5a6c ("riscv: stack: Support HAVE_SOFTIRQ_ON_OWN_STACK")
> Signed-off-by: Jiexun Wang <wangjiexun@...ylab.org>
> ---
> Changes in v2:
> - changed to a more suitable subject line
> - add a Fixes tag
>
> ---
> arch/riscv/kernel/irq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c
> index a8efa053c4a5..a86f272ae2c3 100644
> --- a/arch/riscv/kernel/irq.c
> +++ b/arch/riscv/kernel/irq.c
> @@ -60,7 +60,7 @@ static void init_irq_stacks(void)
> }
> #endif /* CONFIG_VMAP_STACK */
>
> -#ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK
> +#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
It would be good to fix the #endif comment at the bottom of the function
as well.
Regards,
Samuel
> void do_softirq_own_stack(void)
> {
> #ifdef CONFIG_IRQ_STACKS
Powered by blists - more mailing lists