diff options
Diffstat (limited to 'arch/x86_64/kernel/irq.c')
-rw-r--r-- | arch/x86_64/kernel/irq.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c index 30d2a1e545fe..d8bd0b345b1e 100644 --- a/arch/x86_64/kernel/irq.c +++ b/arch/x86_64/kernel/irq.c | |||
@@ -38,9 +38,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
38 | 38 | ||
39 | if (i == 0) { | 39 | if (i == 0) { |
40 | seq_printf(p, " "); | 40 | seq_printf(p, " "); |
41 | for (j=0; j<NR_CPUS; j++) | 41 | for_each_online_cpu(j) |
42 | if (cpu_online(j)) | 42 | seq_printf(p, "CPU%d ",j); |
43 | seq_printf(p, "CPU%d ",j); | ||
44 | seq_putc(p, '\n'); | 43 | seq_putc(p, '\n'); |
45 | } | 44 | } |
46 | 45 | ||
@@ -53,10 +52,8 @@ int show_interrupts(struct seq_file *p, void *v) | |||
53 | #ifndef CONFIG_SMP | 52 | #ifndef CONFIG_SMP |
54 | seq_printf(p, "%10u ", kstat_irqs(i)); | 53 | seq_printf(p, "%10u ", kstat_irqs(i)); |
55 | #else | 54 | #else |
56 | for (j=0; j<NR_CPUS; j++) | 55 | for_each_online_cpu(j) |
57 | if (cpu_online(j)) | 56 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
58 | seq_printf(p, "%10u ", | ||
59 | kstat_cpu(j).irqs[i]); | ||
60 | #endif | 57 | #endif |
61 | seq_printf(p, " %14s", irq_desc[i].handler->typename); | 58 | seq_printf(p, " %14s", irq_desc[i].handler->typename); |
62 | 59 | ||
@@ -68,15 +65,13 @@ skip: | |||
68 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 65 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
69 | } else if (i == NR_IRQS) { | 66 | } else if (i == NR_IRQS) { |
70 | seq_printf(p, "NMI: "); | 67 | seq_printf(p, "NMI: "); |
71 | for (j = 0; j < NR_CPUS; j++) | 68 | for_each_online_cpu(j) |
72 | if (cpu_online(j)) | 69 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); |
73 | seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); | ||
74 | seq_putc(p, '\n'); | 70 | seq_putc(p, '\n'); |
75 | #ifdef CONFIG_X86_LOCAL_APIC | 71 | #ifdef CONFIG_X86_LOCAL_APIC |
76 | seq_printf(p, "LOC: "); | 72 | seq_printf(p, "LOC: "); |
77 | for (j = 0; j < NR_CPUS; j++) | 73 | for_each_online_cpu(j) |
78 | if (cpu_online(j)) | 74 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); |
79 | seq_printf(p, "%10u ", cpu_pda(j)->apic_timer_irqs); | ||
80 | seq_putc(p, '\n'); | 75 | seq_putc(p, '\n'); |
81 | #endif | 76 | #endif |
82 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); | 77 | seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); |