Pull fix-slow-tlb-purge into release branch
[linux-3.10.git] / arch / ia64 / mm / tlb.c
index 99ea8c70f408c76d41ed161689a2072ea79394bc..c93e0f2b5feab9b94c2ccad9507291b554abd2de 100644 (file)
@@ -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();