]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] Fix irq flow handler for 4xx UIC
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 14 Aug 2007 03:52:42 +0000 (13:52 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 17 Aug 2007 01:02:05 +0000 (11:02 +1000)
commit868afce21fdadcecc7bde9263321065948508c56
tree7967611e42ecdb2b53b4f39092a69975822852ab
parent4dc7b4b0405fd7320940849b6e31ea8ea68fd0df
[POWERPC] Fix irq flow handler for 4xx UIC

At present the driver for the UIC (the embedded interrupt controller
in 4xx chips) uses the handle_level_irq() flow handler.  It turns out
this does not correctly handle level triggered interrupts on the UIC.

Specifically, acknowledging an irq on the UIC (i.e. clearing the
relevant bit in UIC_SR) will have no effect for a level interrupt
which is still asserted by the external device, even if the irq is
already masked.  Therefore, unlike handle_level_irq() we must ack the
interrupt after invoking the ISR (which should cause the device to
stop asserting the irq) instead of acking it when we mask it, before
the ISR.

This patch implements this change, in a new handle_uic_irq(), a
customised irq flow handler for the UIC.  For edge triggered
interrupts, handle_uic_irq() still uses the old flow - we must ack
edge triggered interrupt before the ISR not after, or we could miss a
second event which occurred between invoking the ISR and acking the
irq.

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>
arch/powerpc/sysdev/uic.c