Unverified Commit dd8437cd authored by Guo Ren's avatar Guo Ren Committed by Palmer Dabbelt
Browse files

riscv: atomic: Cleanup unnecessary definition



The cmpxchg32 & cmpxchg32_local are not used in Linux anymore. So
clean up asm/cmpxchg.h.

Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/r/20220505035526.2974382-2-guoren@kernel.org


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 19bc59bb
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -348,18 +348,6 @@
#define arch_cmpxchg_local(ptr, o, n)					\
	(__cmpxchg_relaxed((ptr), (o), (n), sizeof(*(ptr))))

#define cmpxchg32(ptr, o, n)						\
({									\
	BUILD_BUG_ON(sizeof(*(ptr)) != 4);				\
	arch_cmpxchg((ptr), (o), (n));					\
})

#define cmpxchg32_local(ptr, o, n)					\
({									\
	BUILD_BUG_ON(sizeof(*(ptr)) != 4);				\
	arch_cmpxchg_relaxed((ptr), (o), (n))				\
})

#define arch_cmpxchg64(ptr, o, n)					\
({									\
	BUILD_BUG_ON(sizeof(*(ptr)) != 8);				\