[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:
committed by
Tony Luck
parent
444d1d9bb5
commit
dc565b525d
@@ -77,9 +77,10 @@ wrap_mmu_context (struct mm_struct *mm)
|
||||
/* can't call flush_tlb_all() here because of race condition with O(1) scheduler [EF] */
|
||||
{
|
||||
int cpu = get_cpu(); /* prevent preemption/migration */
|
||||
for (i = 0; i < NR_CPUS; ++i)
|
||||
if (cpu_online(i) && (i != cpu))
|
||||
for_each_online_cpu(i) {
|
||||
if (i != cpu)
|
||||
per_cpu(ia64_need_tlb_flush, i) = 1;
|
||||
}
|
||||
put_cpu();
|
||||
}
|
||||
local_flush_tlb_all();
|
||||
|
Reference in New Issue
Block a user