kernel: print spurious interrupt message with increasing interval.

This commit is contained in:
Ben Gras 2010-05-08 17:21:37 +00:00
parent 7c334e2670
commit 72335b7642

View file

@ -126,11 +126,13 @@ PUBLIC void irq_handle(int irq)
/* Check for spurious interrupts. */
if(hook == NULL) {
static int nspurious[NR_IRQ_VECTORS];
static int nspurious[NR_IRQ_VECTORS], report_interval = 100;
nspurious[irq]++;
if(nspurious[irq] == 1 || !(nspurious[irq] % 1000)) {
if(nspurious[irq] == 1 || !(nspurious[irq] % report_interval)) {
printf("irq_handle: spurious irq %d (count: %d); keeping masked\n",
irq, nspurious[irq]);
if(report_interval < INT_MAX/2)
report_interval *= 2;
}
return;
}