diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/stat.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index a13431ab7c65..3cb9492801c0 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -45,9 +45,12 @@ static int show_stat(struct seq_file *p, void *v) | |||
45 | softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq); | 45 | softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq); |
46 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); | 46 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); |
47 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); | 47 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); |
48 | for_each_irq_desc(j, desc) { | 48 | for_each_irq_nr(j) { |
49 | #ifdef CONFIG_SPARSE_IRQ | ||
50 | desc = irq_to_desc(j); | ||
49 | if (!desc) | 51 | if (!desc) |
50 | continue; | 52 | continue; |
53 | #endif | ||
51 | sum += kstat_irqs_cpu(j, i); | 54 | sum += kstat_irqs_cpu(j, i); |
52 | } | 55 | } |
53 | sum += arch_irq_stat_cpu(i); | 56 | sum += arch_irq_stat_cpu(i); |
@@ -92,14 +95,17 @@ static int show_stat(struct seq_file *p, void *v) | |||
92 | seq_printf(p, "intr %llu", (unsigned long long)sum); | 95 | seq_printf(p, "intr %llu", (unsigned long long)sum); |
93 | 96 | ||
94 | /* sum again ? it could be updated? */ | 97 | /* sum again ? it could be updated? */ |
95 | for (j = 0; j < NR_IRQS; j++) { | 98 | for_each_irq_nr(j) { |
96 | desc = irq_to_desc(j); | ||
97 | per_irq_sum = 0; | 99 | per_irq_sum = 0; |
98 | 100 | #ifdef CONFIG_SPARSE_IRQ | |
99 | if (desc) { | 101 | desc = irq_to_desc(j); |
100 | for_each_possible_cpu(i) | 102 | if (!desc) { |
101 | per_irq_sum += kstat_irqs_cpu(j, i); | 103 | seq_printf(p, " %u", per_irq_sum); |
104 | continue; | ||
102 | } | 105 | } |
106 | #endif | ||
107 | for_each_possible_cpu(i) | ||
108 | per_irq_sum += kstat_irqs_cpu(j, i); | ||
103 | 109 | ||
104 | seq_printf(p, " %u", per_irq_sum); | 110 | seq_printf(p, " %u", per_irq_sum); |
105 | } | 111 | } |