linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cxl: Keep IRQ mappings on context teardown
@ 2016-04-22  4:57 Michael Neuling
  2016-04-22  4:57 ` [PATCH 2/2] cxl: Poll for outstanding IRQs when detaching a context Michael Neuling
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Michael Neuling @ 2016-04-22  4:57 UTC (permalink / raw)
  To: mpe
  Cc: Frederic Barrat, imunsie, linuxppc-dev, mikey, Vaibhav Jain,
	Frank Haverkamp, Joerg-Stephan Vogt, Wolfgang Bolz1,
	andrew.donnellan

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
---
 drivers/misc/cxl/irq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
index be646dc..8def455 100644
--- a/drivers/misc/cxl/irq.c
+++ b/drivers/misc/cxl/irq.c
@@ -203,7 +203,6 @@ unsigned int cxl_map_irq(struct cxl *adapter, irq_hw_number_t hwirq,
 void cxl_unmap_irq(unsigned int virq, void *cookie)
 {
 	free_irq(virq, cookie);
-	irq_dispose_mapping(virq);
 }
 
 int cxl_register_one_irq(struct cxl *adapter,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-28  1:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22  4:57 [PATCH 1/2] cxl: Keep IRQ mappings on context teardown Michael Neuling
2016-04-22  4:57 ` [PATCH 2/2] cxl: Poll for outstanding IRQs when detaching a context Michael Neuling
2016-04-22  5:14   ` Andrew Donnellan
2016-04-22  5:18   ` Ian Munsie
2016-04-22  6:05   ` Vaibhav Jain
2016-04-28  1:52   ` [2/2] " Michael Ellerman
2016-04-22  5:14 ` [PATCH 1/2] cxl: Keep IRQ mappings on context teardown Andrew Donnellan
2016-04-22  5:18 ` Ian Munsie
2016-04-22  6:03 ` Vaibhav Jain
2016-04-28  1:52 ` [1/2] " Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).