]> git.baikalelectronics.ru Git - kernel.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)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 27 Apr 2016 02:04:31 +0000 (12:04 +1000)
commit0bab368cee9c4259032b3fa46b92f113179c5ce3
tree3ef01b47fc413a5ddb64d46d8ec18e92c65c9e25
parent1a5a07412e9f19dfc5293ef9afeb4bf681d442b7
cxl: Keep IRQ mappings on context teardown

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>
drivers/misc/cxl/irq.c