Skip to content

Commit

Permalink
[POWERPC] Improve robustness of the UIC cascade handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Gibson authored and Paul Mackerras committed Aug 17, 2007
1 parent 868afce commit 553fdff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/sysdev/uic.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ irqreturn_t uic_cascade(int virq, void *data)
int subvirq;

msr = mfdcr(uic->dcrbase + UIC_MSR);
if (!msr) /* spurious interrupt */
return IRQ_HANDLED;

src = 32 - ffs(msr);

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

0 comments on commit 553fdff

Please sign in to comment.