Messages in this thread Patch in this message | | | Date | Fri, 19 Nov 1999 22:08:11 +0100 | From | Pavel Machek <> | Subject | /proc/interrupts: print all interrupts with nonzero counts |
| |
Hi!
If there are some interrupts with non-zero interrupt count, it is a little bit strange. Therefore it should be printed in /proc/interrupts.
Pavel
--- clean/arch/i386/kernel/irq.c Mon Nov 15 22:12:38 1999 +++ linux/arch/i386/kernel/irq.c Mon Nov 15 22:08:52 1999 @@ -145,19 +145,23 @@ *p++ = '\n'; for (i = 0 ; i < NR_IRQS ; i++) { + unsigned keep = 0; + char *q = p; action = irq_desc[i].action; - if (!action) - continue; + p += sprintf(p, "%3d: ",i); #ifndef __SMP__ - p += sprintf(p, "%10u ", kstat_irqs(i)); + p += sprintf(p, "%10u ", keep = kstat_irqs(i)); #else for (j = 0; j < smp_num_cpus; j++) p += sprintf(p, "%10u ", - kstat.irqs[cpu_logical_map(j)][i]); + keep |= kstat.irqs[cpu_logical_map(j)][i]); #endif p += sprintf(p, " %14s", irq_desc[i].handler->typename); - p += sprintf(p, " %s", action->name); + if (!action) { + if (!keep) p = q; else *p++ = '\n'; + continue; + } else p += sprintf(p, " %s", action->name); for (action=action->next; action; action = action->next) p += sprintf(p, ", %s", action->name); -- I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |