On 12/07/2019 18:29, Benjamin Herrenschmidt wrote:
On Fri, 2019-07-12 at 18:20 +1000, Alexey Kardashevskiy wrote:
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.
+ 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