[PATCH][PPC32] Don't synchronize in disable_irq() if no handler
From: Paul Mackerras
Date: Thu Jun 03 2004 - 05:39:03 EST
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@xxxxxxxxx>
diff -urN linux-2.5/arch/ppc/kernel/irq.c pmac-2.5/arch/ppc/kernel/irq.c
--- linux-2.5/arch/ppc/kernel/irq.c 2004-02-23 12:05:11.000000000 +1100
+++ pmac-2.5/arch/ppc/kernel/irq.c 2004-03-11 16:49:24.000000000 +1100
@@ -304,8 +304,10 @@
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);
}
/**
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/