Skip to content

Commit 553fdff

Browse files
dgibsonpaulusmack
authored andcommitted
[POWERPC] Improve robustness of the UIC cascade handler
At present the cascade interrupt handler for the UIC (interrupt controller on 4xx embedded chips) will misbehave badly if it is called spuriously - that is if the handler is invoked when no interrupts are asserted in the child UIC. Although spurious interrupts shouldn't happen, it's good to behave robustly if they do. This patch does so by checking for and ignoring spurious interrupts. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent 868afce commit 553fdff

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎arch/powerpc/sysdev/uic.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ irqreturn_t uic_cascade(int virq, void *data)
266266
int subvirq;
267267

268268
msr = mfdcr(uic->dcrbase + UIC_MSR);
269+
if (!msr) /* spurious interrupt */
270+
return IRQ_HANDLED;
271+
269272
src = 32 - ffs(msr);
270273

271274
subvirq = irq_linear_revmap(uic->irqhost, src);

0 commit comments

Comments
 (0)