summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/cmpxchg.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-04-06 22:33:47 +0300
committerHeiko Carstens <hca@linux.ibm.com>2021-04-12 13:46:43 +0300
commit000174233b91340ca52a9eca905d029a9a2aefd9 (patch)
treeab305b01bc9154fc0c51e39ce1f274a3266416ec /arch/s390/include/asm/cmpxchg.h
parentd2b1f6d2d35043d2c9d079c1595f10c93bfca7d2 (diff)
downloadlinux-000174233b91340ca52a9eca905d029a9a2aefd9.tar.xz
s390/atomic,cmpxchg: switch to use atomic-instrumented.h
Add arch_ prefix to all atomic operations, and define ARCH_ATOMIC. This enables KASAN instrumentation for all atomic operations on s390. This is the s390 variant of commit 8bf705d13039 ("locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h"). Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/cmpxchg.h')
-rw-r--r--arch/s390/include/asm/cmpxchg.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h
index 263d3f87edc8..6def9722124e 100644
--- a/arch/s390/include/asm/cmpxchg.h
+++ b/arch/s390/include/asm/cmpxchg.h
@@ -73,7 +73,7 @@ static inline unsigned long __xchg(unsigned long x, void *ptr, int size)
return x;
}
-#define xchg(ptr, x) \
+#define arch_xchg(ptr, x) \
({ \
__typeof__(*(ptr)) __ret; \
\
@@ -154,7 +154,7 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
return old;
}
-#define cmpxchg(ptr, o, n) \
+#define arch_cmpxchg(ptr, o, n) \
({ \
__typeof__(*(ptr)) __ret; \
\
@@ -164,9 +164,9 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
__ret; \
})
-#define cmpxchg64 cmpxchg
-#define cmpxchg_local cmpxchg
-#define cmpxchg64_local cmpxchg
+#define arch_cmpxchg64 arch_cmpxchg
+#define arch_cmpxchg_local arch_cmpxchg
+#define arch_cmpxchg64_local arch_cmpxchg
#define system_has_cmpxchg_double() 1
@@ -188,7 +188,7 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
!cc; \
})
-#define cmpxchg_double(p1, p2, o1, o2, n1, n2) \
+#define arch_cmpxchg_double(p1, p2, o1, o2, n1, n2) \
({ \
__typeof__(p1) __p1 = (p1); \
__typeof__(p2) __p2 = (p2); \