Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=072f5d82b58cba760191393a6a99fd1123c76e67
Commit:     072f5d82b58cba760191393a6a99fd1123c76e67
Parent:     38e760a1335ffaca5a08624a9aed6fe2055c2c98
Author:     Jan Beulich <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 18:04:40 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:16:54 2007 +0200

    x86: also show non-zero IRQ counts for vectors that currently don't have a 
handler
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/irq_32.c |   18 ++++++++++++++----
 arch/x86/kernel/irq_64.c |   18 ++++++++++++++----
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index 10f3590..d3fde94 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -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:
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
index 3881189..6b5c730 100644
--- a/arch/x86/kernel/irq_64.c
+++ b/arch/x86/kernel/irq_64.c
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to