summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/barrier.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2014-03-13 19:00:35 +0100
committerIngo Molnar <mingo@kernel.org>2014-04-18 14:20:46 +0200
commitd00a569284b1340c16fe2c148099e077ea09ebc9 (patch)
tree5e44a663929cdd1288989150ca9a7304a29cabd9 /arch/x86/include/asm/barrier.h
parentce3609f93445846f7b5a5b4bacb236a9bdc35216 (diff)
downloadlinux-d00a569284b1340c16fe2c148099e077ea09ebc9.tar.gz
linux-d00a569284b1340c16fe2c148099e077ea09ebc9.tar.bz2
linux-d00a569284b1340c16fe2c148099e077ea09ebc9.zip
arch,x86: Convert smp_mb__*()
x86 is strongly ordered and all its atomic ops imply a full barrier. Implement the two new primitives as the old ones were. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Link: http://lkml.kernel.org/n/tip-knswsr5mldkr0w1lrdxvc81w@git.kernel.org Cc: Dave Jones <davej@redhat.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Michel Lespinasse <walken@google.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/barrier.h')
-rw-r--r--arch/x86/include/asm/barrier.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h
index 69bbb4845020..5c7198cca5ed 100644
--- a/arch/x86/include/asm/barrier.h
+++ b/arch/x86/include/asm/barrier.h
@@ -137,6 +137,10 @@ do { \
#endif
+/* Atomic operations are already serializing on x86 */
+#define smp_mb__before_atomic() barrier()
+#define smp_mb__after_atomic() barrier()
+
/*
* Stop RDTSC speculation. This is needed when you need to use RDTSC
* (or get_cycles or vread that possibly accesses the TSC) in a defined