locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local()
Masami Hiramatsu (Google)
maintainerPATCH v2 1/1 locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local()
From: Masami Hiramatsu (Google) <[email protected]>
Use __generic_cmpxchg_local() for arch_cmpxchg_local() implementation in SH architecture because it does not implement arch_cmpxchg_local().
--- arch/sh/include/asm/cmpxchg.h | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/sh/include/asm/cmpxchg.h +9 -0
@@ -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 */
Quoted 8 lines · Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) <[email protected]>
Use
__generic_cmpxchg_local()forarch_cmpxchg_local()implementation in SH architecture because it does not implementarch_cmpxchg_local().
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 20 lines · Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) <[email protected]>
Use
__generic_cmpxchg_local()forarch_cmpxchg_local()implementation in SH architecture because it does not implementarch_cmpxchg_local().Reported-by kernel test robot <[email protected]>Signed-off-by Masami Hiramatsu (Google) <[email protected]>--- arch/sh/include/asm/cmpxchg.h | 9 +++++++++ 1 file changed, 9 insertions(+)arch/sh/include/asm/cmpxchg.h +0
-0@@ -71,4 +71,13 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, (unsigned long)_n_, sizeof(*(ptr))); \ })
arch/sh/include/asm/cmpxchg.h static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, · line 83
Quoted 10 lines
arch/sh/include/asm/cmpxchg.h +9
-0+#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 */
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913