From: Ben Gras Date: Sat, 8 May 2010 17:21:37 +0000 (+0000) Subject: kernel: print spurious interrupt message with increasing interval. X-Git-Tag: v3.1.7~74 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=72335b7642cbd14eb0effa0bf1a5c9e0ce836242;p=minix.git kernel: print spurious interrupt message with increasing interval. --- diff --git a/kernel/interrupt.c b/kernel/interrupt.c index d315c19e6..61a4a6c17 100644 --- a/kernel/interrupt.c +++ b/kernel/interrupt.c @@ -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; }