[ARM] Quieten spurious IRQ detection
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Wed, 22 Mar 2006 10:22:58 +0000 (10:22 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 22 Mar 2006 10:22:58 +0000 (10:22 +0000)
Only issue a "nobody cared" warning after 99900 spurious interrupts.
This avoids the occasional spurious interrupt causing warnings, as
per x86.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/irq.c
include/asm-arm/mach/irq.h

index 1d50d2b98f55a6a0d2835e506c94e6c06dfda0c4..2d5896b36181fa8ceb9636240b8abd13a2a0992e 100644 (file)
@@ -305,14 +305,19 @@ report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int
        static int count = 100;
        struct irqaction *action;
 
-       if (!count || noirqdebug)
+       if (noirqdebug)
                return;
 
-       count--;
-
        if (ret != IRQ_HANDLED && ret != IRQ_NONE) {
+               if (!count)
+                       return;
+               count--;
                printk("irq%u: bogus retval mask %x\n", irq, ret);
        } else {
+               desc->irqs_unhandled++;
+               if (desc->irqs_unhandled <= 99900)
+                       return;
+               desc->irqs_unhandled = 0;
                printk("irq%u: nobody cared\n", irq);
        }
        show_regs(regs);
index 76d05244c6323cff92522099e6559d85bc4e857d..d4d420ecf3a826c37293fad7406a8cf9354bb5c8 100644 (file)
@@ -74,6 +74,7 @@ struct irqdesc {
        unsigned int    noautoenable : 1;       /* don't automatically enable IRQ */
        unsigned int    unused   :25;
 
+       unsigned int    irqs_unhandled;
        struct proc_dir_entry *procdir;
 
 #ifdef CONFIG_SMP