Skip to content

Commit

Permalink
x86: remove extra barriers from load_gs_base()
Browse files Browse the repository at this point in the history
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: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Brian Gerst authored and Tejun Heo committed Jan 27, 2009
1 parent b2d2f43 commit 1825b8e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,7 @@ DECLARE_PER_CPU(char *, irq_stack_ptr);

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));
mb();
}
#endif

Expand Down

0 comments on commit 1825b8e

Please sign in to comment.