[ARM] Quieten spurious IRQ detection
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>
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 1d50d2b..2d5896b 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -305,14 +305,19 @@
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);
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h
index 76d0524..d4d420e 100644
--- a/include/asm-arm/mach/irq.h
+++ b/include/asm-arm/mach/irq.h
@@ -74,6 +74,7 @@
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