summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-04-02 04:07:58 +0200
committerPaul E. McKenney <paulmck@kernel.org>2024-04-10 07:06:00 +0200
commitb7e2a6389e146325227d90eb3ee47bf11647cde6 (patch)
treea15cfc6cc25fa3d2603c5f9bbc0d827b9e74c848 /arch
parentsparc32: make __cmpxchg_u32() return u32 (diff)
downloadlinux-b7e2a6389e146325227d90eb3ee47bf11647cde6.tar.xz
linux-b7e2a6389e146325227d90eb3ee47bf11647cde6.zip
sparc32: make the first argument of __cmpxchg_u64() volatile u64 *
... to match all cmpxchg variants. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/cmpxchg_32.h2
-rw-r--r--arch/sparc/lib/atomic32.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/cmpxchg_32.h b/arch/sparc/include/asm/cmpxchg_32.h
index 2a05cb236480..05d5f86a56dc 100644
--- a/arch/sparc/include/asm/cmpxchg_32.h
+++ b/arch/sparc/include/asm/cmpxchg_32.h
@@ -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>
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c
index d90d756123d8..e15affbbb523 100644
--- a/arch/sparc/lib/atomic32.c
+++ b/arch/sparc/lib/atomic32.c
@@ -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;