[PATCH -next V10 09/10] riscv: stack: Support HAVE_SOFTIRQ_ON_OWN_STACK

Björn Töpel bjorn at kernel.org
Thu Dec 8 23:49:52 PST 2022


Guo Ren <guoren at kernel.org> writes:

> On Thu, Dec 8, 2022 at 6:12 PM Björn Töpel <bjorn at kernel.org> wrote:
>>
>> guoren at kernel.org writes:
>>
>> > From: Guo Ren <guoren at linux.alibaba.com>
>> >
>> > Add the HAVE_SOFTIRQ_ON_OWN_STACK feature for the IRQ_STACKS config. The
>> > irq and softirq use the same independent irq_stack of percpu by time
>> > division multiplexing.
>> >
>> > Tested-by: Jisheng Zhang <jszhang at kernel.org>
>> > Signed-off-by: Guo Ren <guoren at linux.alibaba.com>
>> > Signed-off-by: Guo Ren <guoren at kernel.org>
>> > ---
>> >  arch/riscv/Kconfig      |  7 ++++---
>> >  arch/riscv/kernel/irq.c | 33 +++++++++++++++++++++++++++++++++
>> >  2 files changed, 37 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> > index 0a9d4bdc0338..bd4c4ae4cdc9 100644
>> > --- a/arch/riscv/Kconfig
>> > +++ b/arch/riscv/Kconfig
>> > @@ -447,12 +447,13 @@ config FPU
>> >         If you don't know what to do here, say Y.
>> >
>> >  config IRQ_STACKS
>> > -     bool "Independent irq stacks" if EXPERT
>> > +     bool "Independent irq & softirq stacks" if EXPERT
>> >       default y
>> >       select HAVE_IRQ_EXIT_ON_IRQ_STACK
>> > +     select HAVE_SOFTIRQ_ON_OWN_STACK
>>
>> HAVE_IRQ_EXIT_ON_IRQ_STACK is used by softirq.c Shouldn't that be
>> selected introduced in this patch, instead of the previous one?
> This patch depends on the previous one. And the previous one could
> work separately.

Let me try to be more clear: IRQ_STACKS should be introduced in the
previous patch, which adds per-cpu stacks to hardirq. This patch adds
per-cpu stacks for softirq, and the softirq related selects:

 select HAVE_IRQ_EXIT_ON_IRQ_STACK
 select HAVE_SOFTIRQ_ON_OWN_STACK

Hence, the "HAVE_IRQ_EXIT_ON_IRQ_STACK" select should be part of *this*
patch, not the previous.

Or am I missing something?


Björn



More information about the linux-riscv mailing list