]> git.hungrycats.org Git - linux/commitdiff
Fix IO-APIC edge IRQ handling. IRQ_INPROGRESS was cleared spuriously
authorLinus Torvalds <torvalds@home.transmeta.com>
Wed, 4 Sep 2002 04:06:01 +0000 (21:06 -0700)
committerPaul Mackerras <paulus@au1.ibm.com>
Wed, 4 Sep 2002 04:06:01 +0000 (21:06 -0700)
if a new edge happened while we were still processing the previous
one.

Then, if a _third_ edge came in, it would actually cause a reentrant
irq handler invocation, because the original INPROGRESS bit was now
lost.

This was actually seen on IDE in PIO mode.

arch/i386/kernel/irq.c

index b283b5c0c8b1a798baeceb7e724330cc29073dff..ac767766b6d79f942d86cb32b2cd7653c0c2bb61 100644 (file)
@@ -380,8 +380,9 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs)
                        break;
                desc->status &= ~IRQ_PENDING;
        }
-out:
        desc->status &= ~IRQ_INPROGRESS;
+
+out:
        /*
         * The ->end() handler has to deal with interrupts which got
         * disabled while the handler was running.
@@ -768,7 +769,7 @@ int setup_irq(unsigned int irq, struct irqaction * new)
 
        if (!shared) {
                desc->depth = 0;
-               desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING);
+               desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
                desc->handler->startup(irq);
        }
        spin_unlock_irqrestore(&desc->lock,flags);