]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: print spurious interrupt message with increasing interval.
authorBen Gras <ben@minix3.org>
Sat, 8 May 2010 17:21:37 +0000 (17:21 +0000)
committerBen Gras <ben@minix3.org>
Sat, 8 May 2010 17:21:37 +0000 (17:21 +0000)
kernel/interrupt.c

index d315c19e675bc161bd0bf4733fb300c197fb9c4d..61a4a6c17655d6675edb1ba2952c6d3159f5f42b 100644 (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;
   }