Clear spurious irq stat information when adding irq handler
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Jan 2007 22:16:31 +0000 (14:16 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Jan 2007 22:16:31 +0000 (14:16 -0800)
Any newly added irq handler may obviously make any old spurious irq
status invalid, since the new handler may well be the thing that is
supposed to handle any interrupts that came in.

So just clear the statistics when adding handlers.

Pointed-out-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/irq/manage.c

index b385878c6e807924efbf432644f506297d28097a..8b961adc3bd2d8f27cc14b2b0701e93522e2c232 100644 (file)
@@ -315,6 +315,9 @@ int setup_irq(unsigned int irq, struct irqaction *new)
                        /* Undo nested disables: */
                        desc->depth = 1;
        }
+       /* Reset broken irq detection when installing new handler */
+       desc->irq_count = 0;
+       desc->irqs_unhandled = 0;
        spin_unlock_irqrestore(&desc->lock, flags);
 
        new->irq = irq;