Commit 25542c64 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Ingo Molnar

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: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Cliff Wickman <cpw@sgi.com>
LKML-Reference: <4D7EC791.4040003@cn.fujitsu.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 8460b3e5
...@@ -208,11 +208,10 @@ void native_flush_tlb_others(const struct cpumask *cpumask, ...@@ -208,11 +208,10 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
if (is_uv_system()) { if (is_uv_system()) {
unsigned int cpu; unsigned int cpu;
cpu = get_cpu(); cpu = smp_processor_id();
cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu); cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu);
if (cpumask) if (cpumask)
flush_tlb_others_ipi(cpumask, mm, va); flush_tlb_others_ipi(cpumask, mm, va);
put_cpu();
return; return;
} }
flush_tlb_others_ipi(cpumask, mm, va); flush_tlb_others_ipi(cpumask, mm, va);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment