arm64: move percpu cmpxchg implementation from cmpxchg.h to percpu.h
[sfrench/cifs-2.6.git] / arch / arm64 / include / asm / cmpxchg.h
index bc9e07bc6428d328d81050f63bae01eff7d882ff..19d4a18c2ac8a94243854bafbf48b6c286df8c6c 100644 (file)
@@ -196,32 +196,6 @@ __CMPXCHG_GEN(_mb)
        __ret; \
 })
 
-/* this_cpu_cmpxchg */
-#define _protect_cmpxchg_local(pcp, o, n)                      \
-({                                                             \
-       typeof(*raw_cpu_ptr(&(pcp))) __ret;                     \
-       preempt_disable();                                      \
-       __ret = cmpxchg_local(raw_cpu_ptr(&(pcp)), o, n);       \
-       preempt_enable();                                       \
-       __ret;                                                  \
-})
-
-#define this_cpu_cmpxchg_1(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-#define this_cpu_cmpxchg_2(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-#define this_cpu_cmpxchg_4(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-#define this_cpu_cmpxchg_8(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-
-#define this_cpu_cmpxchg_double_8(ptr1, ptr2, o1, o2, n1, n2)          \
-({                                                                     \
-       int __ret;                                                      \
-       preempt_disable();                                              \
-       __ret = cmpxchg_double_local(   raw_cpu_ptr(&(ptr1)),           \
-                                       raw_cpu_ptr(&(ptr2)),           \
-                                       o1, o2, n1, n2);                \
-       preempt_enable();                                               \
-       __ret;                                                          \
-})
-
 #define __CMPWAIT_CASE(w, sz, name)                                    \
 static inline void __cmpwait_case_##name(volatile void *ptr,           \
                                         unsigned long val)             \