diff options
Diffstat (limited to 'arch/x86/kernel/irq_64.c')
-rw-r--r-- | arch/x86/kernel/irq_64.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index 3881189df8ee..6b5c730d67b9 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) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | if (i < NR_IRQS) { | 64 | if (i < NR_IRQS) { |
65 | unsigned any_count = 0; | ||
66 | |||
65 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 67 | spin_lock_irqsave(&irq_desc[i].lock, flags); |
68 | #ifndef CONFIG_SMP | ||
69 | any_count = kstat_irqs(i); | ||
70 | #else | ||
71 | for_each_online_cpu(j) | ||
72 | any_count |= kstat_cpu(j).irqs[i]; | ||
73 | #endif | ||
66 | action = irq_desc[i].action; | 74 | action = irq_desc[i].action; |
67 | if (!action) | 75 | if (!action && !any_count) |
68 | goto skip; | 76 | goto skip; |
69 | seq_printf(p, "%3d: ",i); | 77 | seq_printf(p, "%3d: ",i); |
70 | #ifndef CONFIG_SMP | 78 | #ifndef CONFIG_SMP |
@@ -76,9 +84,11 @@ int show_interrupts(struct seq_file *p, void *v) | |||
76 | seq_printf(p, " %8s", irq_desc[i].chip->name); | 84 | seq_printf(p, " %8s", irq_desc[i].chip->name); |
77 | seq_printf(p, "-%-8s", irq_desc[i].name); | 85 | seq_printf(p, "-%-8s", irq_desc[i].name); |
78 | 86 | ||
79 | seq_printf(p, " %s", action->name); | 87 | if (action) { |
80 | for (action=action->next; action; action = action->next) | 88 | seq_printf(p, " %s", action->name); |
81 | seq_printf(p, ", %s", action->name); | 89 | while ((action = action->next) != NULL) |
90 | seq_printf(p, ", %s", action->name); | ||
91 | } | ||
82 | seq_putc(p, '\n'); | 92 | seq_putc(p, '\n'); |
83 | skip: | 93 | skip: |
84 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 94 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |