diff options
Diffstat (limited to 'arch/x86/kernel/irq_64.c')
-rw-r--r-- | arch/x86/kernel/irq_64.c | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index 865669efc540..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); |
@@ -86,11 +96,37 @@ skip: | |||
86 | seq_printf(p, "NMI: "); | 96 | seq_printf(p, "NMI: "); |
87 | for_each_online_cpu(j) | 97 | for_each_online_cpu(j) |
88 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); | 98 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); |
89 | seq_putc(p, '\n'); | 99 | seq_printf(p, " Non-maskable interrupts\n"); |
90 | seq_printf(p, "LOC: "); | 100 | seq_printf(p, "LOC: "); |
91 | for_each_online_cpu(j) | 101 | for_each_online_cpu(j) |
92 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); | 102 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); |
93 | seq_putc(p, '\n'); | 103 | seq_printf(p, " Local timer interrupts\n"); |
104 | #ifdef CONFIG_SMP | ||
105 | seq_printf(p, "RES: "); | ||
106 | for_each_online_cpu(j) | ||
107 | seq_printf(p, "%10u ", cpu_pda(j)->irq_resched_count); | ||
108 | seq_printf(p, " Rescheduling interrupts\n"); | ||
109 | seq_printf(p, "CAL: "); | ||
110 | for_each_online_cpu(j) | ||
111 | seq_printf(p, "%10u ", cpu_pda(j)->irq_call_count); | ||
112 | seq_printf(p, " function call interrupts\n"); | ||
113 | seq_printf(p, "TLB: "); | ||
114 | for_each_online_cpu(j) | ||
115 | seq_printf(p, "%10u ", cpu_pda(j)->irq_tlb_count); | ||
116 | seq_printf(p, " TLB shootdowns\n"); | ||
117 | #endif | ||
118 | seq_printf(p, "TRM: "); | ||
119 | for_each_online_cpu(j) | ||
120 | seq_printf(p, "%10u ", cpu_pda(j)->irq_thermal_count); | ||
121 | seq_printf(p, " Thermal event interrupts\n"); | ||
122 | seq_printf(p, "THR: "); | ||
123 | for_each_online_cpu(j) | ||
124 | seq_printf(p, "%10u ", cpu_pda(j)->irq_threshold_count); | ||
125 | seq_printf(p, " Threshold APIC interrupts\n"); | ||
126 | seq_printf(p, "SPU: "); | ||
127 | for_each_online_cpu(j) | ||
128 | seq_printf(p, "%10u ", cpu_pda(j)->irq_spurious_count); | ||
129 | seq_printf(p, " Spurious interrupts\n"); | ||
94 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 130 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |
95 | } | 131 | } |
96 | return 0; | 132 | return 0; |