linux/drivers/misc/cxl
Michael Neuling 625e43ab5c cxl: Keep IRQ mappings on context teardown
[ Upstream commit d6776bba44 ]

Keep IRQ mappings on context teardown.  This won't leak IRQs as if we
allocate the mapping again, the generic code will give the same
mapping used last time.

Doing this works around a race in the generic code. Masking the
interrupt introduces a race which can crash the kernel or result in
IRQ that is never EOIed. The lost of EOI results in all subsequent
mappings to the same HW IRQ never receiving an interrupt.

We've seen this race with cxl test cases which are doing heavy context
startup and teardown at the same time as heavy interrupt load.

A fix to the generic code is being investigated also.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: stable@vger.kernel.org # 3.8
Tested-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Tested-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2016-05-17 14:32:43 -04:00
..
base.c cxl: Add base builtin support 2014-10-08 20:15:56 +11:00
context.c cxl: Unmap MMIO regions when detaching a context 2015-01-27 08:29:36 -08:00
cxl.h cxl: Use image state defaults for reloading FPGA 2015-03-23 21:02:54 -04:00
debugfs.c cxl: Driver code for powernv PCIe based cards for userspace access 2014-10-08 20:15:57 +11:00
fault.c cxl: Fix PSL error due to duplicate segment table entries 2014-10-28 19:52:52 +11:00
file.c cxl: Unmap MMIO regions when detaching a context 2015-01-27 08:29:36 -08:00
irq.c cxl: Keep IRQ mappings on context teardown 2016-05-17 14:32:43 -04:00
Kconfig cxl: Add driver to Kbuild and Makefiles 2014-10-08 20:15:58 +11:00
main.c cxl: Driver code for powernv PCIe based cards for userspace access 2014-10-08 20:15:57 +11:00
Makefile cxl: Add driver to Kbuild and Makefiles 2014-10-08 20:15:58 +11:00
native.c cxl: Add timeout to process element commands 2015-01-27 08:29:36 -08:00
pci.c cxl: Fix unbalanced pci_dev_get in cxl_probe 2015-10-27 09:33:08 -04:00
sysfs.c cxl: Change contexts_lock to a mutex to fix sleep while atomic bug 2015-01-27 08:29:36 -08:00