diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/atomic.h | 18 | ||||
-rw-r--r-- | include/linux/compiler.h | 16 |
2 files changed, 0 insertions, 34 deletions
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index 27e580d232ca..301de78d65f7 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h @@ -4,15 +4,6 @@ #include <asm/atomic.h> #include <asm/barrier.h> -#ifndef atomic_read_ctrl -static inline int atomic_read_ctrl(const atomic_t *v) -{ - int val = atomic_read(v); - smp_read_barrier_depends(); /* Enforce control dependency. */ - return val; -} -#endif - /* * Relaxed variants of xchg, cmpxchg and some atomic operations. * @@ -561,15 +552,6 @@ static inline int atomic_dec_if_positive(atomic_t *v) #include <asm-generic/atomic64.h> #endif -#ifndef atomic64_read_ctrl -static inline long long atomic64_read_ctrl(const atomic64_t *v) -{ - long long val = atomic64_read(v); - smp_read_barrier_depends(); /* Enforce control dependency. */ - return val; -} -#endif - #ifndef atomic64_andnot static inline void atomic64_andnot(long long i, atomic64_t *v) { diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 3d7810341b57..fe817432190c 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -299,22 +299,6 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s __u.__val; \ }) -/** - * READ_ONCE_CTRL - Read a value heading a control dependency - * @x: The value to be read, heading the control dependency - * - * Control dependencies are tricky. See Documentation/memory-barriers.txt - * for important information on how to use them. Note that in many cases, - * use of smp_load_acquire() will be much simpler. Control dependencies - * should be avoided except on the hottest of hotpaths. - */ -#define READ_ONCE_CTRL(x) \ -({ \ - typeof(x) __val = READ_ONCE(x); \ - smp_read_barrier_depends(); /* Enforce control dependency. */ \ - __val; \ -}) - #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ |