[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210218152618.GA91307@C02TD0UTHF1T.local>
Date: Thu, 18 Feb 2021 15:26:18 +0000
From: Mark Rutland <mark.rutland@....com>
To: Hector Martin <marcan@...can.st>
Cc: Arnd Bergmann <arnd@...nel.org>, Rob Herring <robh@...nel.org>,
Tony Lindgren <tony@...mide.com>,
Marc Zyngier <maz@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org,
Krzysztof Kozlowski <krzk@...nel.org>,
devicetree@...r.kernel.org, Alexander Graf <graf@...zon.com>,
Olof Johansson <olof@...om.net>,
Mohamed Mediouni <mohamed.mediouni@...amail.com>,
Stan Skowronek <stan@...ellium.com>,
Will Deacon <will@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
Mark Kettenis <mark.kettenis@...all.nl>
Subject: Re: [PATCH v2 08/25] arm64: Always keep DAIF.[IF] in sync
On Thu, Feb 18, 2021 at 11:42:01PM +0900, Hector Martin wrote:
> On 18/02/2021 23.22, Mark Rutland wrote:
> > I think that for consistency we always want to keep IRQ and FIQ in-sync,
> > even when using GIC priorities. So when handling a pseudo-NMI we should
> > unmask DAIF.DA and leave DAIF.IF masked.
>
> In that case there's one more, in daifflags.h:local_daif_restore():
>
> /*
> * If interrupts are disabled but we can take
> * asynchronous errors, we can take NMIs
> */
> flags &= PSR_I_BIT;
> pmr = GIC_PRIO_IRQOFF;
Good spot, yes!
I did a quick scan with `git grep 'PSR_[IF]_BIT' -- arch/arm64`, and
AFAICT that's the last one.
> > > And a minor related one: should init_gic_priority_masking() WARN if FIQ is
> > > masked too? This probably goes with the above.
> >
> > I think it should, yes.
>
> Done for v3 then. Thanks!
Cool!
Mark.
Powered by blists - more mailing lists