[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>
This commit is contained in:
hawkes@sgi.com
2005-10-10 08:43:26 -07:00
committed by Tony Luck
parent 444d1d9bb5
commit dc565b525d
5 changed files with 20 additions and 19 deletions

View File

@@ -694,9 +694,9 @@ smp_cpus_done (unsigned int dummy)
* Allow the user to impress friends.
*/
for (cpu = 0; cpu < NR_CPUS; cpu++)
if (cpu_online(cpu))
bogosum += cpu_data(cpu)->loops_per_jiffy;
for_each_online_cpu(cpu) {
bogosum += cpu_data(cpu)->loops_per_jiffy;
}
printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
(int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100);