Commit 07a27665 authored by Jiexun Wang's avatar Jiexun Wang Committed by Palmer Dabbelt

RISC-V: Fix wrong use of CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK

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: dd69d07a ("riscv: stack: Support HAVE_SOFTIRQ_ON_OWN_STACK")
Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
Signed-off-by: default avatarJiexun Wang <wangjiexun@tinylab.org>
Reviewed-by: default avatarSamuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20230913052940.374686-1-wangjiexun@tinylab.org
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 1d6cd214
...@@ -60,7 +60,7 @@ static void init_irq_stacks(void) ...@@ -60,7 +60,7 @@ static void init_irq_stacks(void)
} }
#endif /* CONFIG_VMAP_STACK */ #endif /* CONFIG_VMAP_STACK */
#ifdef CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK #ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
void do_softirq_own_stack(void) void do_softirq_own_stack(void)
{ {
#ifdef CONFIG_IRQ_STACKS #ifdef CONFIG_IRQ_STACKS
...@@ -92,7 +92,7 @@ void do_softirq_own_stack(void) ...@@ -92,7 +92,7 @@ void do_softirq_own_stack(void)
#endif #endif
__do_softirq(); __do_softirq();
} }
#endif /* CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK */ #endif /* CONFIG_SOFTIRQ_ON_OWN_STACK */
#else #else
static void init_irq_stacks(void) {} static void init_irq_stacks(void) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment