[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 10 Oct 2020 10:34:04 +0100
From: Marc Zyngier <maz@...nel.org>
To: Masayoshi Mizuma <msys.mizuma@...il.com>
Cc: Sumit Garg <sumit.garg@...aro.org>, catalin.marinas@....com,
will@...nel.org, mark.rutland@....com, daniel.thompson@...aro.org,
jason@...edaemon.net, kgdb-bugreport@...ts.sourceforge.net,
dianders@...omium.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, jason.wessel@...driver.com,
tglx@...utronix.de, julien.thierry.kdev@...il.com
Subject: Re: [PATCH v4 1/5] arm64: Add framework to turn IPI as NMI
On Sat, 10 Oct 2020 02:58:55 +0100,
Masayoshi Mizuma <msys.mizuma@...il.com> wrote:
[...]
> > +void ipi_nmi_setup(int cpu)
> > +{
> > + if (!ipi_desc)
> > + return;
>
> ipi_nmi_setup() may be called twice for CPU0:
>
> set_smp_ipi_range => set_smp_ipi_nmi => ipi_nmi_setup
> => ipi_setup => ipi_nmi_setup
>
> Actually, I got the following error message via the second ipi_nmi_setup():
>
> GICv3: Pseudo-NMIs enabled using relaxed ICC_PMR_EL1 synchronisation
> GICv3: Cannot set NMI property of enabled IRQ 8
> genirq: Failed to setup NMI delivery: irq 8
>
> Why don't we have a check to prevent that? Like as:
>
> if (cpumask_test_cpu(cpu, ipi_desc->percpu_enabled))
> return;
That's definitely the wrong thing to do. prepare_nmi_setup() shouldn't
be called twice, and papering over it isn't acceptable.
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists