]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cxl: Keep IRQ mappings on context teardown
authorMichael Neuling <mikey@neuling.org>
Fri, 22 Apr 2016 04:57:48 +0000 (14:57 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:48:48 +0000 (14:48 -0700)
commitb184522f688a31765a24081ed231e480e76edae6
treef4cfb0edeac46df948183576153301479494f790
parenta9da0b3dc72e074a2f84fad5f176750968a76bdb
cxl: Keep IRQ mappings on context teardown

commit d6776bba44d9752f6cdf640046070e71ee4bba7b upstream.

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>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/cxl/irq.c