Re: [PATCH v3 1/5] arch,locking/atomic: arc: arch_cmpxchg should check data size

2023-11-22 Thread wuqiang.matt
Hello Andi, On 2023/11/23 06:17, Andi Shyti wrote: Hi Wuqiang, On Tue, Nov 21, 2023 at 10:23:43PM +0800, wuqiang.matt wrote: arch_cmpxchg() should check data size rather than pointer size in case CONFIG_ARC_HAS_LLSC is defined. So rename __cmpxchg to __cmpxchg_32 to emphasize it's explicit

[PATCH v3 5/5] arch,locking/atomic: xtensa: define arch_cmpxchg_local as __cmpxchg_local

2023-11-21 Thread wuqiang.matt
The xtensa architecture already has __cmpxchg_local defined but not used. The purpose of __cmpxchg_local() is solely for arch_cmpxchg_local(), just as the definition of arch_cmpxchg_local() for other architectures like x86, arm and powerpc. Signed-off-by: wuqiang.matt --- arch/xtensa/include

[PATCH v3 4/5] arch,locking/atomic: hexagon: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
generci_cmpxchg[64]_local is to be used. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310272207.tlpflya4-...@intel.com/ Signed-off-by: wuqiang.matt Reviewed-by: Masami Hiramatsu (Google) --- arch/hexagon/include/asm/cmpxchg.h | 51 +- 1 file

[PATCH v3 3/5] arch,locking/atomic: openrisc: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
generci_cmpxchg[64]_local is to be used. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310272207.tlpflya4-...@intel.com/ Signed-off-by: wuqiang.matt Reviewed-by: Masami Hiramatsu (Google) --- arch/openrisc/include/asm/cmpxchg.h | 6 ++ 1 file changed, 6 insertions

[PATCH v3 2/5] arch,locking/atomic: arc: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
generci_cmpxchg[64]_local is to be used. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310272207.tlpflya4-...@intel.com/ Signed-off-by: wuqiang.matt Reviewed-by: Masami Hiramatsu (Google) --- arch/arc/include/asm/cmpxchg.h | 28 1 file

[PATCH v3 1/5] arch,locking/atomic: arc: arch_cmpxchg should check data size

2023-11-21 Thread wuqiang.matt
mpxchg variants if avaialble, as Arnd advised Signed-off-by: wuqiang.matt Reviewed-by: Masami Hiramatsu (Google) --- arch/arc/include/asm/cmpxchg.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h

[PATCH v3 0/5] arch,locking/atomic: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
/openrisc/hexagon. Patch 5 defines arch_cmpxchg_local as existing __cmpxchg_local rather the generic variant. wuqiang.matt (5): arch,locking/atomic: arc: arch_cmpxchg should check data size arch,locking/atomic: arc: add arch_cmpxchg[64]_local arch,locking/atomic: openrisc: add arch_cmpxchg[64

[PATCH v2 4/4] locking/atomic: hexagon: arch_cmpxchg[64]_local undefined

2023-11-04 Thread wuqiang.matt
-...@intel.com/ Signed-off-by: wuqiang.matt --- arch/hexagon/include/asm/cmpxchg.h | 51 +- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/arch/hexagon/include/asm/cmpxchg.h b/arch/hexagon/include/asm/cmpxchg.h index bf6cf5579cf4..2b5e5bbaf807 100644

[PATCH v2 2/4] locking/atomic: arc: arch_cmpxchg[64]_local undefined

2023-11-04 Thread wuqiang.matt
For architectures that support native cmpxchg, we'd like to implement arch_cmpxchg[64]_local with the native variants of supported data size. If not, the generci_cmpxchg[64]_local will be used. Signed-off-by: wuqiang.matt --- arch/arc/include/asm/cmpxchg.h | 28 1

[PATCH v2 3/4] locking/atomic: openrisc: arch_cmpxchg[64]_local undefined

2023-11-04 Thread wuqiang.matt
For architectures that support native cmpxchg, we'd like to implement arch_cmpxchg[64]_local with the native variants of supported data size. If not, the generci_cmpxchg[64]_local will be used. Signed-off-by: wuqiang.matt --- arch/openrisc/include/asm/cmpxchg.h | 6 ++ 1 file changed, 6

[PATCH v2 1/4] locking/atomic: arc: data size checking in arch_cmpxchg

2023-11-04 Thread wuqiang.matt
checking is uncecessary. Signed-off-by: wuqiang.matt --- arch/arc/include/asm/cmpxchg.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.h index e138fde067de..bf46514f6f12 100644 --- a/arch/arc/include

[PATCH v2 0/4] locking/atomic: arch_cmpxchg[64]_local undefined

2023-11-04 Thread wuqiang.matt
This patch series implement arch_cmpxchg[64]_local for arc, openrisc and hexagon. For architectures that support native cmpxchg, we'd like to implement arch_cmpxchg[64]_local with the native variants of supported data size. If not, the generci_cmpxchg[64]_local will be used. wuqiang.matt (4

Re: [PATCH 3/3] locking/atomic: openrisc: use generic_cmpxchg[64]_local for arch_cmpxchg[64]_local

2023-11-02 Thread wuqiang.matt
On 2023/11/2 17:30, wuqiang.matt wrote: On 2023/11/2 12:53, Vineet Gupta wrote: On 10/29/23 20:41, wuqiang.matt wrote: arch_cmpxchg_relaxed: ...   switch(sizeof((_p_))) {   case 4: arch_cmpxchg: ... BUILD_BUG_ON(sizeof(_p_) != 4); ... _p is the address pointer, so

Re: [PATCH 3/3] locking/atomic: openrisc: use generic_cmpxchg[64]_local for arch_cmpxchg[64]_local

2023-11-02 Thread wuqiang.matt
On 2023/11/2 12:53, Vineet Gupta wrote: On 10/29/23 20:41, wuqiang.matt wrote: arch_cmpxchg_relaxed: ...   switch(sizeof((_p_))) {   case 4: arch_cmpxchg: ... BUILD_BUG_ON(sizeof(_p_) != 4); ... _p is the address pointer, so I'm thinking it's a typo but I couldn't

Re: [PATCH 3/3] locking/atomic: openrisc: use generic_cmpxchg[64]_local for arch_cmpxchg[64]_local

2023-10-29 Thread wuqiang.matt
On 2023/10/30 10:22, Vineet Gupta wrote: On 10/28/23 20:26, Masami Hiramatsu (Google) wrote: On Sun, 29 Oct 2023 00:40:17 +0800 "wuqiang.matt" wrote: On 2023/10/28 20:49, Masami Hiramatsu (Google) wrote: Hi Wuqiang, On Thu, 26 Oct 2023 19:05:51 +0800 "wuqiang.matt"

Re: [PATCH 3/3] locking/atomic: openrisc: use generic_cmpxchg[64]_local for arch_cmpxchg[64]_local

2023-10-28 Thread wuqiang.matt
On 2023/10/28 20:49, Masami Hiramatsu (Google) wrote: Hi Wuqiang, On Thu, 26 Oct 2023 19:05:51 +0800 "wuqiang.matt" wrote: On 2023/10/26 16:46, Arnd Bergmann wrote: On Thu, Oct 26, 2023, at 09:39, wuqiang.matt wrote: arch_cmpxchg[64]_local() are not defined for openrisc. So impl