Commit 1825b8ed authored by Brian Gerst's avatar Brian Gerst Committed by Tejun Heo

x86: remove extra barriers from load_gs_base()

Impact: optimization

mb() generates an mfence instruction, which is not needed here.  Only
a compiler barrier is needed, and that is handled by the memory clobber
in the wrmsrl function.
Signed-off-by: default avatarBrian Gerst <brgerst@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent b2d2f431
...@@ -397,10 +397,7 @@ DECLARE_PER_CPU(char *, irq_stack_ptr); ...@@ -397,10 +397,7 @@ DECLARE_PER_CPU(char *, irq_stack_ptr);
static inline void load_gs_base(int cpu) static inline void load_gs_base(int cpu)
{ {
/* Memory clobbers used to order pda/percpu accesses */
mb();
wrmsrl(MSR_GS_BASE, (unsigned long)per_cpu(irq_stack_union.gs_base, cpu)); wrmsrl(MSR_GS_BASE, (unsigned long)per_cpu(irq_stack_union.gs_base, cpu));
mb();
} }
#endif #endif
......
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