[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJF2gTSV9HQ+6A1kh48_MjWir7mtfE7+9P9--s-aqPpt9cb7sw@mail.gmail.com>
Date: Sun, 18 Sep 2022 23:42:48 +0800
From: Guo Ren <guoren@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: arnd@...db.de, palmer@...osinc.com, tglx@...utronix.de,
peterz@...radead.org, luto@...nel.org, conor.dooley@...rochip.com,
heiko@...ech.de, jszhang@...nel.org, lazyparser@...il.com,
falcon@...ylab.org, chenhuacai@...nel.org, apatel@...tanamicro.com,
atishp@...shpatra.org, palmer@...belt.com,
paul.walmsley@...ive.com, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH V4 7/8] riscv: Support HAVE_SOFTIRQ_ON_OWN_STACK
On Fri, Sep 9, 2022 at 12:01 AM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
>
> On 2022-09-07 22:25:05 [-0400], guoren@...nel.org wrote:
> > --- a/arch/riscv/kernel/irq.c
> > +++ b/arch/riscv/kernel/irq.c
> > @@ -11,6 +11,7 @@
> > #include <linux/seq_file.h>
> > #include <asm/smp.h>
> > #include <asm/vmap_stack.h>
> > +#include <asm/softirq_stack.h>
> >
> > #ifdef CONFIG_IRQ_STACKS
> > static DEFINE_PER_CPU(ulong *, irq_stack_ptr);
> > @@ -38,6 +39,21 @@ static void init_irq_stacks(void)
> > per_cpu(irq_stack_ptr, cpu) = per_cpu(irq_stack, cpu);
> > }
> > #endif /* CONFIG_VMAP_STACK */
> > +
> > +#ifndef CONFIG_PREEMPT_RT
>
> Could you please replace it with
> #ifdef CONFIG_SOFTIRQ_ON_OWN_STACK
Thx, I would.
>
> instead? See
> https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=8cbb2b50ee2dcb082675237eaaa48fe8479f8aa5
>
> > +static void do_riscv_softirq(struct pt_regs *regs)
> > +{
> > + __do_softirq();
> > +}
> > +
> > +void do_softirq_own_stack(void)
> > +{
> > + ulong *sp = per_cpu(irq_stack_ptr, smp_processor_id());
> > +
> > + call_on_stack(NULL, sp, do_riscv_softirq, 0);
> > +}
> > +#endif /* CONFIG_PREEMPT_RT */
> > +
> > #else
> > static void init_irq_stacks(void) {}
> > #endif /* CONFIG_IRQ_STACKS */
>
> Sebastian
--
Best Regards
Guo Ren
Powered by blists - more mailing lists