diff options
author | hawkes@sgi.com <hawkes@sgi.com> | 2005-10-10 11:43:26 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-25 18:10:08 -0400 |
commit | dc565b525d4b7091a3abb6616d210c8a896a11d7 (patch) | |
tree | 6bd7e8f5cd4e912bfe7f704b1a7b084bfc3cc123 /arch/ia64/kernel/smpboot.c | |
parent | 444d1d9bb5b724f03344c9317bc01d54a9b39073 (diff) |
[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/smpboot.c')
-rw-r--r-- | arch/ia64/kernel/smpboot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 7d72c0d872b3..400a48987124 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -694,9 +694,9 @@ smp_cpus_done (unsigned int dummy) | |||
694 | * Allow the user to impress friends. | 694 | * Allow the user to impress friends. |
695 | */ | 695 | */ |
696 | 696 | ||
697 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 697 | for_each_online_cpu(cpu) { |
698 | if (cpu_online(cpu)) | 698 | bogosum += cpu_data(cpu)->loops_per_jiffy; |
699 | bogosum += cpu_data(cpu)->loops_per_jiffy; | 699 | } |
700 | 700 | ||
701 | printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | 701 | printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", |
702 | (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); | 702 | (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); |