aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/system_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/system_64.h')
-rw-r--r--include/asm-x86/system_64.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/asm-x86/system_64.h b/include/asm-x86/system_64.h
index 02175aa1d16a..5022aecc333d 100644
--- a/include/asm-x86/system_64.h
+++ b/include/asm-x86/system_64.h
@@ -141,8 +141,8 @@ static inline void write_cr8(unsigned long val)
141 141
142#ifdef CONFIG_SMP 142#ifdef CONFIG_SMP
143#define smp_mb() mb() 143#define smp_mb() mb()
144#define smp_rmb() rmb() 144#define smp_rmb() barrier()
145#define smp_wmb() wmb() 145#define smp_wmb() barrier()
146#define smp_read_barrier_depends() do {} while(0) 146#define smp_read_barrier_depends() do {} while(0)
147#else 147#else
148#define smp_mb() barrier() 148#define smp_mb() barrier()
@@ -159,12 +159,8 @@ static inline void write_cr8(unsigned long val)
159 */ 159 */
160#define mb() asm volatile("mfence":::"memory") 160#define mb() asm volatile("mfence":::"memory")
161#define rmb() asm volatile("lfence":::"memory") 161#define rmb() asm volatile("lfence":::"memory")
162
163#ifdef CONFIG_UNORDERED_IO
164#define wmb() asm volatile("sfence" ::: "memory") 162#define wmb() asm volatile("sfence" ::: "memory")
165#else 163
166#define wmb() asm volatile("" ::: "memory")
167#endif
168#define read_barrier_depends() do {} while(0) 164#define read_barrier_depends() do {} while(0)
169#define set_mb(var, value) do { (void) xchg(&var, value); } while (0) 165#define set_mb(var, value) do { (void) xchg(&var, value); } while (0)
170 166