diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-12-08 17:06:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-08 22:16:54 -0500 |
commit | 240d367b4e6c6e3c5075e034db14dba60a6f5fa7 (patch) | |
tree | 9750876ae9afcfa265fc15185134d5aea13eb530 /fs/proc | |
parent | 50dd94e017ec39f85c26b6c10ed9fb2d7a7d8042 (diff) |
sparseirq: fix Alpha build failure
Impact: build fix on Alpha
-tip testing found this build failure on the Alpha defconfig:
/home/mingo/tip/fs/proc/stat.c: In function 'show_stat':
/home/mingo/tip/fs/proc/stat.c:48: error: implicit declaration of function 'for_each_irq_desc'
/home/mingo/tip/fs/proc/stat.c:48: error: expected ';' before '{' token
can not use irq_desc() in stat.c on older architectures.
Signed-off-by: Yinghai Lu <yinghai@kernel.orgg>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/proc')
-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 | } |