]> git.neil.brown.name Git - history.git/commitdiff
Clear IRQ_INPROGRESS as part of "enable_irq()".
authorLinus Torvalds <torvalds@home.osdl.org>
Sun, 12 Oct 2003 12:09:55 +0000 (05:09 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 12 Oct 2003 12:09:55 +0000 (05:09 -0700)
It can have gotten set by a stray interrupt if there were
no handlers while the IRQ was disabled, and we shouldn't
confuse other parts (ie this is another safety-net for the
issues that Al Viro brought up about disable_irq() deadlocks
when no handlers exist).

arch/i386/kernel/irq.c

index ec718b194847e50731667856e543ce1c8e9bd161..1525cf779ecf1bb8b62644c6ec76c28efb039473 100644 (file)
@@ -380,7 +380,7 @@ void enable_irq(unsigned int irq)
        spin_lock_irqsave(&desc->lock, flags);
        switch (desc->depth) {
        case 1: {
-               unsigned int status = desc->status & ~IRQ_DISABLED;
+               unsigned int status = desc->status & ~(IRQ_DISABLED | IRQ_INPROGRESS);
                desc->status = status;
                if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
                        desc->status = status | IRQ_REPLAY;