]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc32: Don't synchronize in disable_irq() if no handler
authorPaul Mackerras <paulus@samba.org>
Thu, 3 Jun 2004 01:21:26 +0000 (18:21 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 01:21:26 +0000 (18:21 -0700)
This patch is the ppc32 counterpart to a fix that went into
arch/i386/kernel/irq.c last October.  The bug was noted by Al Viro: if
no handler exists, and we have IRQ_INPROGRESS set because of an
earlier irq that got through, synchronize_irq() will end up waiting
forever.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/kernel/irq.c

index c1df603954f62f4359ec20e99c5792a6064b0c8b..cc3b36c0d9aff52d79a65be255a44d23153f8363 100644 (file)
@@ -304,8 +304,10 @@ void disable_irq_nosync(unsigned int irq)
 
 void disable_irq(unsigned int irq)
 {
+       irq_desc_t *desc = irq_desc + irq;
        disable_irq_nosync(irq);
-       synchronize_irq(irq);
+       if (desc->action)
+               synchronize_irq(irq);
 }
 
 /**