]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xive: Discard ESB load value when interrupt is invalid
authorFrederic Barrat <fbarrat@linux.ibm.com>
Mon, 13 Jan 2020 13:01:18 +0000 (14:01 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 22 Jan 2020 09:31:41 +0000 (20:31 +1100)
commitc93c77b90d6b1d78009abeb7ff51fe4f5edc0e3e
tree0238a7c29d2976a4c25e26dc2a4dfd908ba0a062
parent3580fdef61fdbada2804bf5e90da2292edc6f279
powerpc/xive: Discard ESB load value when interrupt is invalid

A load on an ESB page returning all 1's means that the underlying
device has invalidated the access to the PQ state of the interrupt
through mmio. It may happen, for example when querying a PHB interrupt
while the PHB is in an error state.

In that case, we should consider the interrupt to be invalid when
checking its state in the irq_get_irqchip_state() handler.

Fixes: 9c70c4f0f4eb ("powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
[clg: wrote a commit log, introduced XIVE_ESB_INVALID ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200113130118.27969-1-clg@kaod.org
arch/powerpc/include/asm/xive-regs.h
arch/powerpc/sysdev/xive/common.c