diff options
Diffstat (limited to 'arch/x86/mm/tlb.c')
| -rw-r--r-- | arch/x86/mm/tlb.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 6acc724d5d8..d6c0418c3e4 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c | |||
| @@ -179,12 +179,8 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask, | |||
| 179 | sender = this_cpu_read(tlb_vector_offset); | 179 | sender = this_cpu_read(tlb_vector_offset); |
| 180 | f = &flush_state[sender]; | 180 | f = &flush_state[sender]; |
| 181 | 181 | ||
| 182 | /* | 182 | if (nr_cpu_ids > NUM_INVALIDATE_TLB_VECTORS) |
| 183 | * Could avoid this lock when | 183 | raw_spin_lock(&f->tlbstate_lock); |
| 184 | * num_online_cpus() <= NUM_INVALIDATE_TLB_VECTORS, but it is | ||
| 185 | * probably not worth checking this for a cache-hot lock. | ||
| 186 | */ | ||
| 187 | raw_spin_lock(&f->tlbstate_lock); | ||
| 188 | 184 | ||
| 189 | f->flush_mm = mm; | 185 | f->flush_mm = mm; |
| 190 | f->flush_va = va; | 186 | f->flush_va = va; |
| @@ -202,7 +198,8 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask, | |||
| 202 | 198 | ||
| 203 | f->flush_mm = NULL; | 199 | f->flush_mm = NULL; |
| 204 | f->flush_va = 0; | 200 | f->flush_va = 0; |
| 205 | raw_spin_unlock(&f->tlbstate_lock); | 201 | if (nr_cpu_ids > NUM_INVALIDATE_TLB_VECTORS) |
| 202 | raw_spin_unlock(&f->tlbstate_lock); | ||
| 206 | } | 203 | } |
| 207 | 204 | ||
| 208 | void native_flush_tlb_others(const struct cpumask *cpumask, | 205 | void native_flush_tlb_others(const struct cpumask *cpumask, |
| @@ -211,11 +208,10 @@ void native_flush_tlb_others(const struct cpumask *cpumask, | |||
| 211 | if (is_uv_system()) { | 208 | if (is_uv_system()) { |
| 212 | unsigned int cpu; | 209 | unsigned int cpu; |
| 213 | 210 | ||
| 214 | cpu = get_cpu(); | 211 | cpu = smp_processor_id(); |
| 215 | cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu); | 212 | cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu); |
| 216 | if (cpumask) | 213 | if (cpumask) |
| 217 | flush_tlb_others_ipi(cpumask, mm, va); | 214 | flush_tlb_others_ipi(cpumask, mm, va); |
| 218 | put_cpu(); | ||
| 219 | return; | 215 | return; |
| 220 | } | 216 | } |
| 221 | flush_tlb_others_ipi(cpumask, mm, va); | 217 | flush_tlb_others_ipi(cpumask, mm, va); |
