diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2011-03-14 21:57:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-03-15 03:30:34 -0400 |
commit | 25542c646afbf14c43fa7d2b443055cadb73b07a (patch) | |
tree | bb49d9918ecf8b2677282bcdbf222949399a5d06 /arch/x86/mm | |
parent | 8460b3e5bc64955aeefdd8357b3bf7b5ff79b3f2 (diff) |
x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others()
native_flush_tlb_others() is called from:
flush_tlb_current_task()
flush_tlb_mm()
flush_tlb_page()
All these functions disable preemption explicitly, so we can use
smp_processor_id() instead of get_cpu() and put_cpu().
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Cliff Wickman <cpw@sgi.com>
LKML-Reference: <4D7EC791.4040003@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/tlb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 55272d7c3b0b..d6c0418c3e47 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c | |||
@@ -208,11 +208,10 @@ void native_flush_tlb_others(const struct cpumask *cpumask, | |||
208 | if (is_uv_system()) { | 208 | if (is_uv_system()) { |
209 | unsigned int cpu; | 209 | unsigned int cpu; |
210 | 210 | ||
211 | cpu = get_cpu(); | 211 | cpu = smp_processor_id(); |
212 | cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu); | 212 | cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu); |
213 | if (cpumask) | 213 | if (cpumask) |
214 | flush_tlb_others_ipi(cpumask, mm, va); | 214 | flush_tlb_others_ipi(cpumask, mm, va); |
215 | put_cpu(); | ||
216 | return; | 215 | return; |
217 | } | 216 | } |
218 | flush_tlb_others_ipi(cpumask, mm, va); | 217 | flush_tlb_others_ipi(cpumask, mm, va); |