|
@@ -179,12 +179,8 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask,
|
|
|
sender = this_cpu_read(tlb_vector_offset);
|
|
|
f = &flush_state[sender];
|
|
|
|
|
|
- /*
|
|
|
- * Could avoid this lock when
|
|
|
- * num_online_cpus() <= NUM_INVALIDATE_TLB_VECTORS, but it is
|
|
|
- * probably not worth checking this for a cache-hot lock.
|
|
|
- */
|
|
|
- raw_spin_lock(&f->tlbstate_lock);
|
|
|
+ if (nr_cpu_ids > NUM_INVALIDATE_TLB_VECTORS)
|
|
|
+ raw_spin_lock(&f->tlbstate_lock);
|
|
|
|
|
|
f->flush_mm = mm;
|
|
|
f->flush_va = va;
|
|
@@ -202,7 +198,8 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask,
|
|
|
|
|
|
f->flush_mm = NULL;
|
|
|
f->flush_va = 0;
|
|
|
- raw_spin_unlock(&f->tlbstate_lock);
|
|
|
+ if (nr_cpu_ids > NUM_INVALIDATE_TLB_VECTORS)
|
|
|
+ raw_spin_unlock(&f->tlbstate_lock);
|
|
|
}
|
|
|
|
|
|
void native_flush_tlb_others(const struct cpumask *cpumask,
|