[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190801073737.wrhespf5xh3qudil@willie-the-truck>
Date: Thu, 1 Aug 2019 08:37:37 +0100
From: Will Deacon <will@...nel.org>
To: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Dan Rue <dan.rue@...aro.org>,
Daniel Diaz <daniel.diaz@...aro.org>,
Anders Roxell <anders.roxell@...aro.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
linux-kernel@...r.kernel.org, Matt Hart <matthew.hart@...aro.org>,
"Paul E . McKenney" <paulmck@...ux.ibm.com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 3/4] arm64: Make debug exception handlers visible from
RCU
Hi Masami,
On Thu, Aug 01, 2019 at 02:32:25PM +0900, Masami Hiramatsu wrote:
> On Wed, 31 Jul 2019 18:26:03 +0100
> Will Deacon <will@...nel.org> wrote:
> > On Thu, Jul 25, 2019 at 05:16:15PM +0900, Masami Hiramatsu wrote:
> > > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> > > index 9568c116ac7f..ed6c55c87fdc 100644
> > > --- a/arch/arm64/mm/fault.c
> > > +++ b/arch/arm64/mm/fault.c
> > > @@ -777,6 +777,42 @@ void __init hook_debug_fault_code(int nr,
> > > debug_fault_info[nr].name = name;
> > > }
> > >
> > > +/*
> > > + * In debug exception context, we explicitly disable preemption.
> >
> > Maybe add "despite having interrupts disabled"?
>
> OK, I'll add it.
>
> > > + * This serves two purposes: it makes it much less likely that we would
> > > + * accidentally schedule in exception context and it will force a warning
> > > + * if we somehow manage to schedule by accident.
> > > + */
> > > +static void debug_exception_enter(struct pt_regs *regs)
> > > +{
> > > + if (user_mode(regs)) {
> > > + RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
> > > + } else {
> > > + /*
> > > + * We might have interrupted pretty much anything. In
> > > + * fact, if we're a debug exception, we can even interrupt
> > > + * NMI processing. We don't want this code makes in_nmi()
> > > + * to return true, but we need to notify RCU.
> > > + */
> > > + rcu_nmi_enter();
> > > + }
> > > +
> > > + preempt_disable();
> >
> > If you're addingt new functions for entry/exit, maybe move the
> > trace_hardirqs_{on,off}() calls in here too?
>
> OK, let's move it in these functions.
Brill, thanks. Please just resend this patch, as I can pick the other three
up as they are.
Will
Powered by blists - more mailing lists