diff options
author | hawkes@sgi.com | 2005-10-10 17:43:26 +0200 |
---|---|---|
committer | Tony Luck | 2005-10-26 00:10:08 +0200 |
commit | dc565b525d4b7091a3abb6616d210c8a896a11d7 (patch) | |
tree | 6bd7e8f5cd4e912bfe7f704b1a7b084bfc3cc123 /arch/ia64/kernel/irq.c | |
parent | [PATCH] qlogic lockup fix (diff) | |
download | kernel-qcow2-linux-dc565b525d4b7091a3abb6616d210c8a896a11d7.tar.gz kernel-qcow2-linux-dc565b525d4b7091a3abb6616d210c8a896a11d7.tar.xz kernel-qcow2-linux-dc565b525d4b7091a3abb6616d210c8a896a11d7.zip |
[IA64] wider use of for_each_cpu_mask() in arch/ia64
In arch/ia64 change the explicit use of for-loops and NR_CPUS into the
general for_each_cpu() or for_each_online_cpu() constructs, as
appropriate. This widens the scope of potential future optimizations
of the general constructs, as well as takes advantage of the existing
optimizations of first_cpu() and next_cpu().
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/irq.c')
-rw-r--r-- | arch/ia64/kernel/irq.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c index 205d98028261..d33244c32759 100644 --- a/arch/ia64/kernel/irq.c +++ b/arch/ia64/kernel/irq.c @@ -57,9 +57,9 @@ int show_interrupts(struct seq_file *p, void *v) if (i == 0) { seq_printf(p, " "); - for (j=0; j<NR_CPUS; j++) - if (cpu_online(j)) - seq_printf(p, "CPU%d ",j); + for_each_online_cpu(j) { + seq_printf(p, "CPU%d ",j); + } seq_putc(p, '\n'); } @@ -72,9 +72,9 @@ int show_interrupts(struct seq_file *p, void *v) #ifndef CONFIG_SMP seq_printf(p, "%10u ", kstat_irqs(i)); #else - for (j = 0; j < NR_CPUS; j++) - if (cpu_online(j)) - seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); + for_each_online_cpu(j) { + seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); + } #endif seq_printf(p, " %14s", irq_desc[i].handler->typename); seq_printf(p, " %s", action->name); |