diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-12-08 14:06:17 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-09 04:16:54 +0100 |
commit | 240d367b4e6c6e3c5075e034db14dba60a6f5fa7 (patch) | |
tree | 9750876ae9afcfa265fc15185134d5aea13eb530 /fs/proc | |
parent | 50dd94e017ec39f85c26b6c10ed9fb2d7a7d8042 (diff) | |
download | linux-240d367b4e6c6e3c5075e034db14dba60a6f5fa7.tar.gz linux-240d367b4e6c6e3c5075e034db14dba60a6f5fa7.tar.bz2 linux-240d367b4e6c6e3c5075e034db14dba60a6f5fa7.zip |
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) softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq); steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); - for_each_irq_desc(j, desc) { + for_each_irq_nr(j) { +#ifdef CONFIG_SPARSE_IRQ + desc = irq_to_desc(j); if (!desc) continue; +#endif sum += kstat_irqs_cpu(j, i); } sum += arch_irq_stat_cpu(i); @@ -92,14 +95,17 @@ static int show_stat(struct seq_file *p, void *v) seq_printf(p, "intr %llu", (unsigned long long)sum); /* sum again ? it could be updated? */ - for (j = 0; j < NR_IRQS; j++) { - desc = irq_to_desc(j); + for_each_irq_nr(j) { per_irq_sum = 0; - - if (desc) { - for_each_possible_cpu(i) - per_irq_sum += kstat_irqs_cpu(j, i); +#ifdef CONFIG_SPARSE_IRQ + desc = irq_to_desc(j); + if (!desc) { + seq_printf(p, " %u", per_irq_sum); + continue; } +#endif + for_each_possible_cpu(i) + per_irq_sum += kstat_irqs_cpu(j, i); seq_printf(p, " %u", per_irq_sum); } |