linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ppc_irq_dispatch_handler and unhandled interrupts
@ 2002-11-21 16:58 Hollis Blanchard
  2002-11-21 18:25 ` Matt Porter
  2002-11-22 22:45 ` Paul Mackerras
  0 siblings, 2 replies; 4+ messages in thread
From: Hollis Blanchard @ 2002-11-21 16:58 UTC (permalink / raw)
  To: devel list

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

Here's the failure mode:
On a 405LP (using ppc405_pic), an irq is becoming unmasked[1] (in
UIC0_ER). ppc_irq_dispatch_handler sees irq_desc[0].action == NULL, and
correctly complains of an unhandled interrupt and masks it off. However
at the end of the same function (label "out"), the irq is unmasked again
because irq_desc[0].handler == ppc405_pic (irq_desc[0..NR_IRQS] =
ppc405_pic; see ppc4xx_init_IRQ() ). So the irq is unmasked, occurs
again, is masked, is unmasked, occurs again...

The attached patch fixes the problem by checking desc->action as well as
desc->handler - there is no sense unmasking an interrupt if we already
know there are no drivers ready to handle it.

[1] In my particular case, UIC0_ER is being modified by BIOS when waking
from sleep (the BIOS later returns control to Linux), which could be
worked around in wakeup code. However in the interest of handling as
many unexpected hardware and software errors as possible, I believe this
patch should be applied.

-Hollis
-- 
PowerPC Linux
IBM Linux Technology Center

[-- Attachment #2: unhandled-irq.diff --]
[-- Type: text/plain, Size: 430 bytes --]

--- arch/ppc/kernel/irq.c	2001/12/18 00:18:00	1.1.1.2
+++ arch/ppc/kernel/irq.c	2002/11/21 16:13:22
@@ -513,7 +513,7 @@
 	 * The ->end() handler has to deal with interrupts which got
 	 * disabled while the handler was running.
 	 */
-	if (irq_desc[irq].handler) {
+	if (desc->handler && desc->action) {
 		if (irq_desc[irq].handler->end)
 			irq_desc[irq].handler->end(irq);
 		else if (irq_desc[irq].handler->enable)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-25 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-21 16:58 ppc_irq_dispatch_handler and unhandled interrupts Hollis Blanchard
2002-11-21 18:25 ` Matt Porter
2002-11-22 22:45 ` Paul Mackerras
2002-11-25 22:04   ` Hollis Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).