]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: also show non-zero IRQ counts for vectors that currently don't have a handler
authorJan Beulich <jbeulich@novell.com>
Wed, 17 Oct 2007 16:04:40 +0000 (18:04 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:16:54 +0000 (20:16 +0200)
It doesn't seem to make sense to hide these, even if their counts
can't change at the point in time they're being displayed.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/irq_32.c
arch/x86/kernel/irq_64.c

index 10f359021aaeebec9e19e808ae5db2eb51ed7cff..d3fde94f734557809925d1e73cc2e021cebd6342 100644 (file)
@@ -255,9 +255,17 @@ int show_interrupts(struct seq_file *p, void *v)
        }
 
        if (i < NR_IRQS) {
+               unsigned any_count = 0;
+
                spin_lock_irqsave(&irq_desc[i].lock, flags);
+#ifndef CONFIG_SMP
+               any_count = kstat_irqs(i);
+#else
+               for_each_online_cpu(j)
+                       any_count |= kstat_cpu(j).irqs[i];
+#endif
                action = irq_desc[i].action;
-               if (!action)
+               if (!action && !any_count)
                        goto skip;
                seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
@@ -268,10 +276,12 @@ int show_interrupts(struct seq_file *p, void *v)
 #endif
                seq_printf(p, " %8s", irq_desc[i].chip->name);
                seq_printf(p, "-%-8s", irq_desc[i].name);
-               seq_printf(p, "  %s", action->name);
 
-               for (action=action->next; action; action = action->next)
-                       seq_printf(p, ", %s", action->name);
+               if (action) {
+                       seq_printf(p, "  %s", action->name);
+                       while ((action = action->next) != NULL)
+                               seq_printf(p, ", %s", action->name);
+               }
 
                seq_putc(p, '\n');
 skip:
index 3881189df8ee5658410f18a7a01d445d241eaaa1..6b5c730d67b9d36a184f8340e8c4fa2b5b55ede0 100644 (file)
@@ -62,9 +62,17 @@ int show_interrupts(struct seq_file *p, void *v)
        }
 
        if (i < NR_IRQS) {
+               unsigned any_count = 0;
+
                spin_lock_irqsave(&irq_desc[i].lock, flags);
+#ifndef CONFIG_SMP
+               any_count = kstat_irqs(i);
+#else
+               for_each_online_cpu(j)
+                       any_count |= kstat_cpu(j).irqs[i];
+#endif
                action = irq_desc[i].action;
-               if (!action
+               if (!action && !any_count)
                        goto skip;
                seq_printf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
@@ -76,9 +84,11 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, " %8s", irq_desc[i].chip->name);
                seq_printf(p, "-%-8s", irq_desc[i].name);
 
-               seq_printf(p, "  %s", action->name);
-               for (action=action->next; action; action = action->next)
-                       seq_printf(p, ", %s", action->name);
+               if (action) {
+                       seq_printf(p, "  %s", action->name);
+                       while ((action = action->next) != NULL)
+                               seq_printf(p, ", %s", action->name);
+               }
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);