summaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-11-06 11:03:12 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-11-12 14:01:28 +0100
commitf99d670e31b960562fcd34587e9f824b6f05a144 (patch)
tree6b8807801253375661630b619a3950d9b1a31b91 /arch/s390/include
parentffc5eac2cda81eec85b75338212d3098f7daef49 (diff)
downloadlinux-stable-f99d670e31b960562fcd34587e9f824b6f05a144.tar.gz
linux-stable-f99d670e31b960562fcd34587e9f824b6f05a144.tar.bz2
linux-stable-f99d670e31b960562fcd34587e9f824b6f05a144.zip
s390/cmpxchg: Use arch_cmpxchg() instead of __atomic_cmpxchg()
Use arch_cmpxchg() instead of __atomic_cmpxchg() for the arch_atomic_cmpxchg() implementations. arch_cmpxchg() generates the same code and doesn't need a cast like it is required for arch_atomic64_cmpxchg(). Reviewed-by: Juergen Christ <jchrist@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h
index fcedb01c7fe0..38e81fb7e066 100644
--- a/arch/s390/include/asm/atomic.h
+++ b/arch/s390/include/asm/atomic.h
@@ -80,7 +80,7 @@ static __always_inline int arch_atomic_xchg(atomic_t *v, int new)
static __always_inline int arch_atomic_cmpxchg(atomic_t *v, int old, int new)
{
- return __atomic_cmpxchg(&v->counter, old, new);
+ return arch_cmpxchg(&v->counter, old, new);
}
#define arch_atomic_cmpxchg arch_atomic_cmpxchg
@@ -124,7 +124,7 @@ static __always_inline s64 arch_atomic64_xchg(atomic64_t *v, s64 new)
static __always_inline s64 arch_atomic64_cmpxchg(atomic64_t *v, s64 old, s64 new)
{
- return __atomic64_cmpxchg((long *)&v->counter, old, new);
+ return arch_cmpxchg(&v->counter, old, new);
}
#define arch_atomic64_cmpxchg arch_atomic64_cmpxchg