summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2023-10-25 17:10:05 +0200
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2023-11-02 10:13:12 +0100
commit63f1ee206170ad2363aa25fd99bd5ae529c690ae (patch)
tree92cf5eff576a00e820d555867dbd6e61325efcf3 /arch/sh
parentDocumentation: kernel-parameters: Add earlyprintk=bios on SH (diff)
downloadlinux-63f1ee206170ad2363aa25fd99bd5ae529c690ae.tar.xz
linux-63f1ee206170ad2363aa25fd99bd5ae529c690ae.zip
locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local()
Use __generic_cmpxchg_local() for arch_cmpxchg_local() implementation on SH architecture because it does not implement arch_cmpxchg_local(). Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202310241310.Ir5uukOG-lkp@intel.com/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/169824660459.24340.14614817132696360531.stgit@devnote2 Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/asm/cmpxchg.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/include/asm/cmpxchg.h b/arch/sh/include/asm/cmpxchg.h
index 288f6f38d98f..5d617b3ef78f 100644
--- a/arch/sh/include/asm/cmpxchg.h
+++ b/arch/sh/include/asm/cmpxchg.h
@@ -71,4 +71,13 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
(unsigned long)_n_, sizeof(*(ptr))); \
})
+#include <asm-generic/cmpxchg-local.h>
+
+#define arch_cmpxchg_local(ptr, o, n) ({ \
+ (__typeof__(*ptr))__generic_cmpxchg_local((ptr), \
+ (unsigned long)(o), \
+ (unsigned long)(n), \
+ sizeof(*(ptr))); \
+})
+
#endif /* __ASM_SH_CMPXCHG_H */