Thread (10 messages) 10 messages, 4 authors, 2019-07-15

Re: [RFC PATCH kernel] powerpc/xive: Drop deregistered irqs

flat view

From: Alexey Kardashevskiy <hidden>
Date: 2019-07-12 09:39:34


On 12/07/2019 18:29, Benjamin Herrenschmidt wrote:
On Fri, 2019-07-12 at 18:20 +1000, Alexey Kardashevskiy wrote:
quoted
diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 082c7e1c20f0..65742e280337 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -148,8 +148,12 @@ static u32 xive_scan_interrupts(struct xive_cpu *xc, bool just_peek)
  		irq = xive_read_eq(&xc->queue[prio], just_peek);
  
  		/* Found something ? That's it */
-		if (irq)
-			break;
+		if (irq) {
+			/* Another CPU may have shut this irq down, check it */
+			if (irq_to_desc(irq))
What if it gets deregistered here .... ?
Yeah that is the problem.
quoted
+				break;
+			irq = 0;
+		}
  
  		/* Clear pending bits */
  		xc->pending_prio &= ~(1 << prio);
Wouldn't it be better to check the return value from generic_handle_irq
instead ?
Where exactly, here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/kernel/irq.c#n614

If so, then in order to do EOI, I'll need the desc which is gone, or I am missing the point?


-- 
Alexey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help