[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <77e67121-3857-4389-897b-77a6506a3443@spud>
Date: Mon, 27 Mar 2023 14:49:34 +0100
From: Conor Dooley <conor.dooley@...rochip.com>
To: Guo Ren <guoren@...nel.org>
CC: <arnd@...db.de>, <palmer@...osinc.com>, <tglx@...utronix.de>,
<peterz@...radead.org>, <luto@...nel.org>, <heiko@...ech.de>,
<jszhang@...nel.org>, <lazyparser@...il.com>, <falcon@...ylab.org>,
<chenhuacai@...nel.org>, <apatel@...tanamicro.com>,
<atishp@...shpatra.org>, <mark.rutland@....com>,
<bjorn@...nel.org>, <linux-arch@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-riscv@...ts.infradead.org>,
Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH -next V11 1/3] riscv: stack: Support
HAVE_IRQ_EXIT_ON_IRQ_STACK
On Mon, Mar 27, 2023 at 09:32:51PM +0800, Guo Ren wrote:
> On Mon, Mar 27, 2023 at 7:30 PM Conor Dooley <conor.dooley@...rochip.com> wrote:
> >
> > On Fri, Mar 24, 2023 at 03:12:37AM -0400, guoren@...nel.org wrote:
> > > From: Guo Ren <guoren@...ux.alibaba.com>
> > >
> > > Add independent irq stacks for percpu to prevent kernel stack overflows.
> > > It is also compatible with VMAP_STACK by implementing
> > > arch_alloc_vmap_stack. Many architectures have supported
> > > HAVE_IRQ_EXIT_ON_IRQ_STACK, riscv should follow up.
> > >
> > > Tested-by: Jisheng Zhang <jszhang@...nel.org>
> > > Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
> > > Signed-off-by: Guo Ren <guoren@...nel.org>
> >
> > > --- a/arch/riscv/kernel/irq.c
> > > +++ b/arch/riscv/kernel/irq.c
> > > @@ -9,6 +9,37 @@
> > > #include <linux/irqchip.h>
> > > #include <linux/seq_file.h>
> > > #include <asm/smp.h>
> > > +#include <asm/vmap_stack.h>
> > > +
> > > +#ifdef CONFIG_IRQ_STACKS
> > > +DEFINE_PER_CPU(ulong *, irq_stack_ptr);
> >
> > btw, sparse is complaining about this variable:
> > ../arch/riscv/kernel/irq.c:15:1: warning: symbol '__pcpu_scope_irq_stack_ptr' was not declared. Should it be static?
> I declared it in traps.c, maybe I should put it in the vmap_stack.h.
Ahh, I was distracted by the DEFINE_PER_CPU above and didn't look at
where the actual declaration was.. Moving it to a header sounds good to
me, thanks.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists