diff options
Diffstat (limited to 'arch/x86/include/asm/barrier.h')
| -rw-r--r-- | arch/x86/include/asm/barrier.h | 19 | 
1 files changed, 4 insertions, 15 deletions
diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h index e51a8f803f55..0681d2532527 100644 --- a/arch/x86/include/asm/barrier.h +++ b/arch/x86/include/asm/barrier.h @@ -57,12 +57,12 @@  do {									\  	compiletime_assert_atomic_type(*p);				\  	smp_mb();							\ -	ACCESS_ONCE(*p) = (v);						\ +	WRITE_ONCE(*p, v);						\  } while (0)  #define smp_load_acquire(p)						\  ({									\ -	typeof(*p) ___p1 = ACCESS_ONCE(*p);				\ +	typeof(*p) ___p1 = READ_ONCE(*p);				\  	compiletime_assert_atomic_type(*p);				\  	smp_mb();							\  	___p1;								\ @@ -74,12 +74,12 @@ do {									\  do {									\  	compiletime_assert_atomic_type(*p);				\  	barrier();							\ -	ACCESS_ONCE(*p) = (v);						\ +	WRITE_ONCE(*p, v);						\  } while (0)  #define smp_load_acquire(p)						\  ({									\ -	typeof(*p) ___p1 = ACCESS_ONCE(*p);				\ +	typeof(*p) ___p1 = READ_ONCE(*p);				\  	compiletime_assert_atomic_type(*p);				\  	barrier();							\  	___p1;								\ @@ -91,15 +91,4 @@ do {									\  #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 - * code region. - */ -static __always_inline void rdtsc_barrier(void) -{ -	alternative_2("", "mfence", X86_FEATURE_MFENCE_RDTSC, -			  "lfence", X86_FEATURE_LFENCE_RDTSC); -} -  #endif /* _ASM_X86_BARRIER_H */  |