]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3: Ensure pseudo-NMIs have an ISB between ack and handling
authorMark Rutland <mark.rutland@arm.com>
Fri, 13 May 2022 13:30:36 +0000 (14:30 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 15 May 2022 15:38:18 +0000 (16:38 +0100)
commitf4634f614bb6ba58ddf388d53c570c41cf72368a
tree3b628b0f118432b9b8ee75af5b93788556f3fc0b
parent8dd3e26bbbc758feb75d55e38f0ba1ef6979f6d1
irqchip/gic-v3: Ensure pseudo-NMIs have an ISB between ack and handling

There are cases where a context synchronization event is necessary
between an IRQ being raised and being handled, and there are races such
that we cannot rely upon the exception entry being subsequent to the
interrupt being raised.

We identified and fixes this for regular IRQs in commit:

  2f327fd89815732d ("irqchip/gic: Ensure we have an ISB between ack and ->handle_irq")

Unfortunately, we forgot to do the same for psuedo-NMIs when support for
those was added in commit:

  08d91b833444c307 ("irqchip/gic-v3: Handle pseudo-NMIs")

Which means that when pseudo-NMIs are used for PMU support, we'll hit
the same problem.

Apply the same fix as for regular IRQs. Note that when EOI mode 1 is in
use, the call to gic_write_eoir() will provide an ISB.

Fixes: 08d91b833444c307 ("irqchip/gic-v3: Handle pseudo-NMIs")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220513133038.226182-2-mark.rutland@arm.com
drivers/irqchip/irq-gic-v3.c