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

2023-11-07 Thread Google
On Sat, 4 Nov 2023 17:16:12 +0800 "wuqiang.matt" wrote: > Macro __cmpxchg() renamed to __cmpxchg_32() to emphasize it's explicit > support of 32bit data size, BUILD_BUG_ON() added to avoid any possible > misuses with unsupported data types. > > In case CONFIG_ARC_HAS_LLSC is undefined,

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

2023-11-04 Thread wuqiang.matt
Macro __cmpxchg() renamed to __cmpxchg_32() to emphasize it's explicit support of 32bit data size, BUILD_BUG_ON() added to avoid any possible misuses with unsupported data types. In case CONFIG_ARC_HAS_LLSC is undefined, arch_cmpxchg() uses spinlock to accomplish SMP-safety, so the BUILD_BUG_ON