sparc32: make the first argument of __cmpxchg_u64() volatile u64 *
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 2 Apr 2024 02:07:58 +0000 (22:07 -0400)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 10 Apr 2024 05:06:00 +0000 (22:06 -0700)
... to match all cmpxchg variants.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
arch/sparc/include/asm/cmpxchg_32.h
arch/sparc/lib/atomic32.c

index 2a05cb236480c1b001a6cfd8e2fdbf40e6ca7dce..05d5f86a56dc2358dfa0ca22fbfd8e83fa3d345c 100644 (file)
@@ -63,7 +63,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
                        (unsigned long)_n_, sizeof(*(ptr)));            \
 })
 
-u64 __cmpxchg_u64(u64 *ptr, u64 old, u64 new);
+u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new);
 #define arch_cmpxchg64(ptr, old, new)  __cmpxchg_u64(ptr, old, new)
 
 #include <asm-generic/cmpxchg-local.h>
index d90d756123d8163823f092a76bf9fc0ae8a3e17a..e15affbbb5238d4456b374be8c32b1e4b2d87e44 100644 (file)
@@ -173,7 +173,7 @@ u32 __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new)
 }
 EXPORT_SYMBOL(__cmpxchg_u32);
 
-u64 __cmpxchg_u64(u64 *ptr, u64 old, u64 new)
+u64 __cmpxchg_u64(volatile u64 *ptr, u64 old, u64 new)
 {
        unsigned long flags;
        u64 prev;