[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ff15164-11db-d3c9-e194-a35facf9971d@arm.com>
Date: Wed, 5 Dec 2018 13:02:36 +0000
From: James Morse <james.morse@....com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: Julien Thierry <julien.thierry@....com>,
linux-arm-kernel@...ts.infradead.org,
Mark Rutland <mark.rutland@....com>,
daniel.thompson@...aro.org, marc.zyngier@....com,
will.deacon@....com, linux-kernel@...r.kernel.org,
christoffer.dall@....com, joel@...lfernandes.org,
Dave Martin <dave.martin@....com>
Subject: Re: [PATCH v6 21/24] arm64: Handle serror in NMI context
Hi Catalin,
On 04/12/2018 18:09, Catalin Marinas wrote:
> On Mon, Nov 12, 2018 at 11:57:12AM +0000, Julien Thierry wrote:
>> diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
>> index 5f4d9ac..66344cd 100644
>> --- a/arch/arm64/kernel/traps.c
>> +++ b/arch/arm64/kernel/traps.c
>> @@ -897,13 +897,17 @@ bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned int esr)
>>
>> asmlinkage void do_serror(struct pt_regs *regs, unsigned int esr)
>> {
>> - nmi_enter();
>> + const bool was_in_nmi = in_nmi();
>> +
>> + if (!was_in_nmi)
>> + nmi_enter();
>>
>> /* non-RAS errors are not containable */
>> if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr))
>> arm64_serror_panic(regs, esr);
>>
>> - nmi_exit();
>> + if (!was_in_nmi)
>> + nmi_exit();
>> }
>
> Do we actually need nmi_enter/exit in the outer do_serror() function?
> Could we just move it to arm64_serror_panic()?
They might need to be here in the future: if we support kernel-first we would
have extra calls in here that need to be in_nmi(), the same if we call out to
APEI to support APCI's NOTIFY_SEI.
Thanks,
James
Powered by blists - more mailing lists