arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch in conditional expression
kernel test robot
build bottree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulate two-byte cmpxchg config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20260924/[email protected]/config) compiler: arc-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/lock.h:5,
from arch/arc/include/asm/bitops.h:190,
from include/linux/bitops.h:67,
from include/linux/log2.h:12,
from include/asm-generic/div64.h:55,
from ./arch/arc/include/generated/asm/div64.h:1,
from include/linux/math.h:6,
from include/linux/math64.h:6,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/fs_dirent.h:5,
from include/linux/fs/super_types.h:5,
from include/linux/fs/super.h:5,
from include/linux/fs.h:5,
from include/linux/fscrypt.h:16,
from fs/crypto/fscrypt_private.h:15,
from fs/crypto/hooks.c:10:
fs/crypto/hooks.c: In function 'fscrypt_get_symlink':
>> arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch in conditional expression [-Wincompatible-pointer-types]
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
| ^
include/linux/atomic.h:68:9: note: in expansion of macro 'arch_cmpxchg_relaxed'
68 | op##_relaxed(args); \
| ^~
include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansion of macro '__atomic_op_release'
80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4803:9: note: in expansion of macro 'raw_cmpxchg_release'
4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~
fs/crypto/hooks.c:420:13: note: in expansion of macro 'cmpxchg_release'
420 | cmpxchg_release(&inode->i_link, NULL, pstr.name) != NULL)
| ^~~~~~~~~~~~~~~
arch/arc/include/asm/cmpxchg.h:46:51: note: first expression has type 'char *'
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
| ^~~~~~
include/linux/atomic.h:68:9: note: in expansion of macro 'arch_cmpxchg_relaxed'
68 | op##_relaxed(args); \
| ^~
include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansion of macro '__atomic_op_release'
80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4803:9: note: in expansion of macro 'raw_cmpxchg_release'
4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~
fs/crypto/hooks.c:420:13: note: in expansion of macro 'cmpxchg_release'
420 | cmpxchg_release(&inode->i_link, NULL, pstr.name) != NULL)
| ^~~~~~~~~~~~~~~
arch/arc/include/asm/cmpxchg.h:46:60: note: second expression has type 'unsigned char *'
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
| ^~~~~
include/linux/atomic.h:68:9: note: in expansion of macro 'arch_cmpxchg_relaxed'
68 | op##_relaxed(args); \
| ^~
include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansion of macro '__atomic_op_release'
80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4803:9: note: in expansion of macro 'raw_cmpxchg_release'
4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~
fs/crypto/hooks.c:420:13: note: in expansion of macro 'cmpxchg_release'
420 | cmpxchg_release(&inode->i_link, NULL, pstr.name) != NULL)
| ^~~~~~~~~~~~~~~vim +46 arch/arc/include/asm/cmpxchg.h
41
42 #define arch_cmpxchg_relaxed(ptr, old, new) \
43 ({ \
44 __typeof__(ptr) _p_ = (ptr); \
45 unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \
> 46 unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
47 __typeof__(*(ptr)) _prev_; \
48 \
49 switch (sizeof(*(_p_))) { \
50 case 1: \
51 _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *__force)_p_, _old_, _new_); \
52 break; \
53 case 2: \
54 _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u16((volatile u16 *__force)_p_, _old_, _new_); \
55 break; \
56 case 4: \
57 _prev_ = (__typeof__(*(ptr)))__cmpxchg(_p_, _old_, _new_); \
58 break; \
59 default: \
60 BUILD_BUG(); \
61 } \
62 _prev_; \
63 })
64 --
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Vineet Gupta
maintainerQuoted 34 lines · kernel test robot
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulate two-byte cmpxchg config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20260924/[email protected]/config) compiler: arc-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from ./arch/arc/include/generated/asm/div64.h:1, from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19, from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':
Quoted 2 lines
Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch in conditional expression [-Wincompatible-pointer-types]46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
Issue is in fs/crypto/hooks.c doing cmpxchg_release(&inode->i_link, NULL, pstr.name) where i_link is char * and pstr.name is unsigned char *),
The problem is when pointer types are incompatible and that's exactly the W toggle above.
So Bradley's patch needs this fixup
arch/arc/include/asm/cmpxchg.h +0 -0
@@ -42,8 +42,10 @@
#define arch_cmpxchg_relaxed(ptr, old, new) \
({ \
__typeof__(ptr) _p_ = (ptr); \
- unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \
- unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
+ __typeof__(*(ptr)) _o_ = (old); \
+ __typeof__(*(ptr)) _n_ = (new); \
+ unsigned long _old_ = (unsigned long)_o_; \
+ unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at least test the building, specially when this involves the macro maze. Its really easy with crosstool hosting all the cross-compilers [1] - just download and untar.
[1] https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/16.2.0/
Thx,
-Vineet
Quoted 80 lines
| ^ include/linux/atomic.h:68:9: note: in expansion of macro 'arch_cmpxchg_relaxed' 68 | op##_relaxed(args); \ | ^~ include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansion of macro '__atomic_op_release' 80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4803:9: note: in expansion of macro 'raw_cmpxchg_release' 4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~ fs/crypto/hooks.c:420:13: note: in expansion of macro 'cmpxchg_release' 420 | cmpxchg_release(&inode->i_link, NULL, pstr.name) != NULL) | ^~~~~~~~~~~~~~~ arch/arc/include/asm/cmpxchg.h:46:51: note: first expression has type 'char *' 46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ | ^~~~~~ include/linux/atomic.h:68:9: note: in expansion of macro 'arch_cmpxchg_relaxed' 68 | op##_relaxed(args); \ | ^~ include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansion of macro '__atomic_op_release' 80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4803:9: note: in expansion of macro 'raw_cmpxchg_release' 4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~ fs/crypto/hooks.c:420:13: note: in expansion of macro 'cmpxchg_release' 420 | cmpxchg_release(&inode->i_link, NULL, pstr.name) != NULL) | ^~~~~~~~~~~~~~~ arch/arc/include/asm/cmpxchg.h:46:60: note: second expression has type 'unsigned char *' 46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ | ^~~~~ include/linux/atomic.h:68:9: note: in expansion of macro 'arch_cmpxchg_relaxed' 68 | op##_relaxed(args); \ | ^~ include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansion of macro '__atomic_op_release' 80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4803:9: note: in expansion of macro 'raw_cmpxchg_release' 4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~ fs/crypto/hooks.c:420:13: note: in expansion of macro 'cmpxchg_release' 420 | cmpxchg_release(&inode->i_link, NULL, pstr.name) != NULL) | ^~~~~~~~~~~~~~~vim +46
arch/arc/include/asm/cmpxchg.h41 42 #define arch_cmpxchg_relaxed(ptr, old, new) \ 43 ({ \ 44 __typeof__(ptr) _p_ = (ptr); \ 45 unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \Quoted 1 line
46 unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
47 __typeof__(*(ptr)) _prev_; \ 48 \ 49 switch (sizeof(*(_p_))) { \ 50 case 1: \ 51 _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *__force)_p_, _old_, _new_); \ 52 break; \ 53 case 2: \ 54 _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u16((volatile u16 *__force)_p_, _old_, _new_); \ 55 break; \ 56 case 4: \ 57 _prev_ = (__typeof__(*(ptr)))__cmpxchg(_p_, _old_, _new_); \ 58 break; \ 59 default: \ 60 BUILD_BUG(); \ 61 } \ 62 _prev_; \ 63 }) 64--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Quoted 74 lines · Vineet Gupta
Quoted 3 lines · kernel test robot
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulatetwo-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 2 lines
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 15 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from ./arch/arc/include/generated/asm/div64.h:1, from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19,Quoted 9 lines
from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch inconditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Issue is in
fs/crypto/hooks.cdoingcmpxchg_release(&inode->i_link, NULL, pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly the W toggle above.
So Bradley's patch needs this fixup
arch/arc/include/asm/cmpxchg.h +4
-2@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \ - unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ + __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at least test the building, specially when this involves the macro maze. Its really easy with crosstool hosting all the cross-compilers [1] - just download and untar.
Well thanks but I didn't have a proper server till yesterday.
I'll post all arch patches when Paul tells me how he wants it
Like if he wants u16 in first then arch changes sent.
Quoted 62 lines
Thx,
-VineetQuoted 2 lines
| ^
include/linux/atomic.h:68:9: note: in expansion of macro'
arch_cmpxchg_relaxed'Quoted 1 line
68 | op##_relaxed(args);\Quoted 2 lines
| ^~
include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansionof macro '
__atomic_op_release'Quoted 3 lines
80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4803:9: note: inexpansion of macro '
raw_cmpxchg_release'Quoted 3 lines
4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~
fs/crypto/hooks.c:420:13: note: in expansion of macro'
cmpxchg_release'Quoted 1 line
420 | cmpxchg_release(&inode->i_link, NULL, pstr.name)!= NULL)
Quoted 2 lines
| ^~~~~~~~~~~~~~~
arch/arc/include/asm/cmpxchg.h:46:51: note: first expression hastype 'char *'
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Quoted 2 lines
| ^~~~~~
include/linux/atomic.h:68:9: note: in expansion of macro'
arch_cmpxchg_relaxed'Quoted 1 line
68 | op##_relaxed(args);\Quoted 2 lines
| ^~
include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansionof macro '
__atomic_op_release'Quoted 3 lines
80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4803:9: note: inexpansion of macro '
raw_cmpxchg_release'Quoted 3 lines
4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~
fs/crypto/hooks.c:420:13: note: in expansion of macro'
cmpxchg_release'Quoted 1 line
420 | cmpxchg_release(&inode->i_link, NULL, pstr.name)!= NULL)
Quoted 2 lines
| ^~~~~~~~~~~~~~~
arch/arc/include/asm/cmpxchg.h:46:60: note: second expression hastype 'unsigned char *'
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Quoted 1 line
|^~~~~
Quoted 1 line
include/linux/atomic.h:68:9: note: in expansion of macro'
arch_cmpxchg_relaxed'Quoted 1 line
68 | op##_relaxed(args);\Quoted 2 lines
| ^~
include/linux/atomic/atomic-arch-fallback.h:80:9: note: in expansionof macro '
__atomic_op_release'Quoted 3 lines
80 | __atomic_op_release(arch_cmpxchg, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4803:9: note: in
Quoted 46 lines
expansion of macro '
raw_cmpxchg_release'Quoted 3 lines
4803 | raw_cmpxchg_release(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~
fs/crypto/hooks.c:420:13: note: in expansion of macro'
cmpxchg_release'Quoted 1 line
420 | cmpxchg_release(&inode->i_link, NULL, pstr.name)!= NULL)
Quoted 38 lines
| ^~~~~~~~~~~~~~~vim +46
arch/arc/include/asm/cmpxchg.h41 42 #define arch_cmpxchg_relaxed(ptr, old, new) \ 43 ({ \ 44 __typeof__(ptr) _p_ = (ptr); \ 45 unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \Quoted 1 line
46 unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \
47 __typeof__(*(ptr)) _prev_; \ 48 \ 49 switch (sizeof(*(_p_))) { \ 50 case 1: \ 51 _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *__force)_p_, _old_, _new_); \ 52 break; \ 53 case 2: \ 54 _prev_ = (__typeof__(*(ptr)))cmpxchg_emu_u16((volatile u16 *__force)_p_, _old_, _new_); \ 55 break; \ 56 case 4: \ 57 _prev_ = (__typeof__(*(ptr)))__cmpxchg(_p_, _old_, _new_); \ 58 break; \ 59 default: \ 60 BUILD_BUG(); \ 61 } \ 62 _prev_; \ 63 }) 64--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
--- Thanks!
"I'm not a very positive person" - Linus torvalds
Quoted 68 lines · Bradley Morgan
Quoted 67 lines · Vineet Gupta
Quoted 3 lines · kernel test robot
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulatetwo-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 1 line
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 14 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from ./arch/arc/include/generated/asm/div64.h:1, from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19,Quoted 9 lines
from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch inconditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Issue is in
fs/crypto/hooks.cdoingcmpxchg_release(&inode->i_link, NULL, pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly the W toggle above.
So Bradley's patch needs this fixup
arch/arc/include/asm/cmpxchg.h +4
-2@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \ - unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ + __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
Quoted 8 lines
Quoted 7 lines
P.S: For arch changes shouldn't the submitter be required to at least test the building, specially when this involves the macro maze. Its really easy with crosstool hosting all the cross-compilers [1] - just download and untar.[1]
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/16.2.0/Well thanks but I didn't have a proper server till yesterday.
A relatively decent laptop works for me.
Quoted 1 line
I'll post all arch patches when Paul tells me how he wants it
Please do a minimal compile build - it will save you the re-spins.
Quoted 1 line
Like if he wants u16 in first then arch changes sent.
Sure !
Cheers,
-Vineet
Quoted 74 lines · Vineet Gupta
Quoted 73 lines · Bradley Morgan
Quoted 72 lines · Vineet Gupta
Quoted 3 lines · kernel test robot
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulatetwo-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 1 line
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 14 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from ./arch/arc/include/generated/asm/div64.h:1, from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19,Quoted 9 lines
from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch inconditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Issue is in
fs/crypto/hooks.cdoingcmpxchg_release(&inode->i_link, NULL, pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly the W toggle above.
So Bradley's patch needs this fixup
arch/arc/include/asm/cmpxchg.h +4
-2@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \ - unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ + __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at least test the building, specially when this involves the macro maze. Its really easy with crosstool hosting all the cross-compilers [1] - just download and untar.
Quoted 5 lines
Quoted 3 lines
Well thanks but I didn't have a proper server till yesterday.
A relatively decent laptop works for me.
And you will get *way* faster response time than waiting on kernel test robot. ;-)
Quoted 5 lines
Quoted 1 line
I'll post all arch patches when Paul tells me how he wants it
Please do a minimal compile build - it will save you the re-spins.
Quoted 1 line
Like if he wants u16 in first then arch changes sent.
First, I queued Vineet's cmpxchg patch from his pull request to Linus. I have marked it "EXP" so that I don't accidentally ship it off somewhere myself.
Given the surprises from the u8/u16 changes, I suggest the following:
1. One patch to add cmpxchg_emu_u16(), but without the u8/u16
changes. And without the CONFIG_ARCH_NEED_CMPXCHG_1_2_EMU change.
At Bradley's option, cmpxchg_emu_u8() could remain as is, with cmpxchg_emu_u16() being born as u16. The upside is less churn
later. The downside is that more up-front testing is needed,
and thus greater interaction with busy architecture maintainers. If it was me, I would start with cmpxchg_emu_u16() being as close to cmpxchg_emu_u8() as possible in order to "get the camel's nose into the tent" as quickly and easily as possible. But this is Bradley's patch series, so his choice.
2. One patch each to add use of cmpxchg_emu_u16() to each
affected architecture.
3. Given #1, each patch for #2 can go in independently. The patches
for #2 of course need acks from their respective maintainers.
4. A patch to rename CONFIG_ARCH_NEED_CMPXCHG_1_EMU to
CONFIG_ARCH_NEED_CMPXCHG_1_2_EMU. This will cross lib and architectures, which should be OK because it is just a name change. We collect acks as before.
5. Convert cmpxchg_emu_u8() away from uintptr_t, and, if needed,
cmpxchg_emu_u16() as well.
This could take a merge window or three to get in, but that is not all that bad for cross-architecture patch serieses such as this one.
Bradley, Vineet, thoughts?
Thanx, Paul
Vineet Gupta
maintainerQuoted 116 lines · Paul E. McKenney
Quoted 74 lines · Vineet Gupta
Quoted 73 lines · Bradley Morgan
Quoted 72 lines · Vineet Gupta
Quoted 3 lines · kernel test robot
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulatetwo-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 1 line
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 14 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from ./arch/arc/include/generated/asm/div64.h:1, from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19,Quoted 9 lines
from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch inconditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Issue is in
fs/crypto/hooks.cdoingcmpxchg_release(&inode->i_link, NULL, pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly the W toggle above.
So Bradley's patch needs this fixup
arch/arc/include/asm/cmpxchg.h +4
-2@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \ - unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ + __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at least test the building, specially when this involves the macro maze. Its really easy with crosstool hosting all the cross-compilers [1] - just download and untar.Quoted 4 lines
Quoted 3 lines
Well thanks but I didn't have a proper server till yesterday.
A relatively decent laptop works for me.
And you will get *way* faster response time than waiting on kernel test robot. ;-)
Quoted 4 lines
Quoted 1 line
I'll post all arch patches when Paul tells me how he wants it
Please do a minimal compile build - it will save you the re-spins.
Quoted 1 line
Like if he wants u16 in first then arch changes sent.
First, I queued Vineet's cmpxchg patch from his pull request to Linus. I have marked it "EXP" so that I don't accidentally ship it off somewhere myself.
Given the surprises from the u8/u16 changes, I suggest the following:
1. One patch to add
cmpxchg_emu_u16(), but without the u8/u16
changes. And without theCONFIG_ARCH_NEED_CMPXCHG_1_2_EMUchange.At Bradley's option,
cmpxchg_emu_u8()could remain as is, withcmpxchg_emu_u16()being born as u16. The upside is less churn
later. The downside is that more up-front testing is needed,
and thus greater interaction with busy architecture maintainers. If it was me, I would start withcmpxchg_emu_u16()being as close tocmpxchg_emu_u8()as possible in order to "get the camel's nose into the tent" as quickly and easily as possible. But this is Bradley's patch series, so his choice.2. One patch each to add use of
cmpxchg_emu_u16()to each
affected architecture.3. Given #1, each patch for #2 can go in independently. The patches
for #2 of course need acks from their respective maintainers.4. A patch to rename
CONFIG_ARCH_NEED_CMPXCHG_1_EMUto
CONFIG_ARCH_NEED_CMPXCHG_1_2_EMU. This will cross lib and architectures, which should be OK because it is just a name change. We collect acks as before.
Quoted 7 lines
5. Convert
cmpxchg_emu_u8()away fromuintptr_t, and, if needed,cmpxchg_emu_u16() as well.This could take a merge window or three to get in, but that is not all that bad for cross-architecture patch serieses such as this one.
Bradley, Vineet, thoughts?
Sound like a plan, buy hey its Bradley doing all the work here ;-)
I would only add something I mentioned before: download the cross toolchains and do some build testing locally before posting. This is not because arch maintainers are busy or lazy (although they can be both) - that saves potential respins induced by new code or even broken existing code exposed.
And on that topic I just found a gcc 16 ICE when building an allyesconfig for ARC. I will only be able to post the gcc fix after LPC, but just FYI in case someone runs into it.
Thx,
-Vineet
Quoted 140 lines · Vineet Gupta
Quoted 3 lines · Paul E. McKenney
Quoted 2 lines · Vineet Gupta
Quoted 1 line · Bradley Morgan
On 24 September 2026 21:52:55 BST, Vineet Gupta <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines · kernel test robot
Quoted 3 lines
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC:Emulate
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
two-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from
./arch/arc/include/generated/asm/div64.h:1,Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19, from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatchin
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
conditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ?
*(_p_) :
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
(new)); \
Issue is in
fs/crypto/hooks.cdoing cmpxchg_release(&inode->i_link,NULL,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly
the
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 5 lines
W toggle above.
So Bradley's patch needs this fixup
(quoted diff) +0
-0
b/arch/arc/include/asm/cmpxchg.hQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arc/include/asm/cmpxchg.h line 45
Quoted 8 lines
index
4596edfefa95..9053098bb152100644arch/arc/include/asm/cmpxchg.h +0
-1@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old));\
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h line 46
Quoted 1 line
arch/arc/include/asm/cmpxchg.h +0
-1- unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new));\
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
arch/arc/include/asm/cmpxchg.h +4
-0+ __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at leasttest
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the building, specially when this involves the macro maze. Its really
easy
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
with crosstool hosting all the cross-compilers [1] - just download
and
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
untar.
[1]
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/16.2.0/
Quoted 11 lines
Quoted 2 lines
Quoted 1 line
Well thanks but I didn't have a proper server till yesterday.
A relatively decent laptop works for me.
And you will get *way* faster response time than waiting on kernel test robot. ;-)
Quoted 4 lines
Quoted 1 line
I'll post all arch patches when Paul tells me how he wants it
Please do a minimal compile build - it will save you the re-spins.
Quoted 1 line
Like if he wants u16 in first then arch changes sent.
First, I queued Vineet's cmpxchg patch from his pull request to Linus. I have marked it "EXP" so that I don't accidentally ship it off
somewhere
Quoted 31 lines
myself.
Given the surprises from the u8/u16 changes, I suggest the following:
1. One patch to add
cmpxchg_emu_u16(), but without the u8/u16
changes. And without theCONFIG_ARCH_NEED_CMPXCHG_1_2_EMUchange.At Bradley's option,
cmpxchg_emu_u8()could remain as is, withcmpxchg_emu_u16()being born as u16. The upside is less churn
later. The downside is that more up-front testing is needed,
and thus greater interaction with busy architecture maintainers. If it was me, I would start withcmpxchg_emu_u16()being as close tocmpxchg_emu_u8()as possible in order to "get the camel's nose into the tent" as quickly and easily as possible. But this is Bradley's patch series, so his choice.2. One patch each to add use of
cmpxchg_emu_u16()to each
affected architecture.3. Given #1, each patch for #2 can go in independently. The patches
for #2 of course need acks from their respective maintainers.4. A patch to rename
CONFIG_ARCH_NEED_CMPXCHG_1_EMUto
CONFIG_ARCH_NEED_CMPXCHG_1_2_EMU. This will cross lib and architectures, which should be OK because it is just a name change. We collect acks as before.5. Convert
cmpxchg_emu_u8()away fromuintptr_t, and, if needed,cmpxchg_emu_u16() as well.
Quoted 6 lines
Quoted 4 lines
This could take a merge window or three to get in, but that is not all that bad for cross-architecture patch serieses such as this one.
Bradley, Vineet, thoughts?
Sound like a plan, buy hey its Bradley doing all the work here ;-)
Hmm, I'd prefer to leave u16 as is, I'll send the rename patch in the coming hours/days, I have school
Quoted 6 lines
I would only add something I mentioned before: download the cross toolchains and do some build testing locally before posting. This is not because arch maintainers are busy or lazy (although they can be both) - that saves potential respins induced by new code or even broken existing code exposed.
Quoted 7 lines
And on that topic I just found a gcc 16 ICE when building an allyesconfig for ARC. I will only be able to post the gcc fix after LPC, but just FYI in case someone runs into it.
Thx,
-Vineet
--- Thanks!
"I'm not a very positive person" - Linus torvalds
Quoted 122 lines · Vineet Gupta
Quoted 119 lines · Paul E. McKenney
Quoted 74 lines · Vineet Gupta
Quoted 73 lines · Bradley Morgan
Quoted 72 lines · Vineet Gupta
Quoted 3 lines · kernel test robot
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC: Emulatetwo-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 1 line
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 14 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from ./arch/arc/include/generated/asm/div64.h:1, from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19,Quoted 9 lines
from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatch inconditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ? *(_p_) :(new)); \
Issue is in
fs/crypto/hooks.cdoingcmpxchg_release(&inode->i_link, NULL, pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly the W toggle above.
So Bradley's patch needs this fixup
arch/arc/include/asm/cmpxchg.h +4
-2@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old)); \ - unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new)); \ + __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at least test the building, specially when this involves the macro maze. Its really easy with crosstool hosting all the cross-compilers [1] - just download and untar.Quoted 4 lines
Quoted 3 lines
Well thanks but I didn't have a proper server till yesterday.
A relatively decent laptop works for me.
And you will get *way* faster response time than waiting on kernel test robot. ;-)
Quoted 4 lines
Quoted 1 line
I'll post all arch patches when Paul tells me how he wants it
Please do a minimal compile build - it will save you the re-spins.
Quoted 1 line
Like if he wants u16 in first then arch changes sent.
First, I queued Vineet's cmpxchg patch from his pull request to Linus. I have marked it "EXP" so that I don't accidentally ship it off somewhere myself.
Given the surprises from the u8/u16 changes, I suggest the following:
1. One patch to add
cmpxchg_emu_u16(), but without the u8/u16
changes. And without theCONFIG_ARCH_NEED_CMPXCHG_1_2_EMUchange.At Bradley's option,
cmpxchg_emu_u8()could remain as is, withcmpxchg_emu_u16()being born as u16. The upside is less churn
later. The downside is that more up-front testing is needed,
and thus greater interaction with busy architecture maintainers. If it was me, I would start withcmpxchg_emu_u16()being as close tocmpxchg_emu_u8()as possible in order to "get the camel's nose into the tent" as quickly and easily as possible. But this is Bradley's patch series, so his choice.2. One patch each to add use of
cmpxchg_emu_u16()to each
affected architecture.3. Given #1, each patch for #2 can go in independently. The patches
for #2 of course need acks from their respective maintainers.4. A patch to rename
CONFIG_ARCH_NEED_CMPXCHG_1_EMUto
CONFIG_ARCH_NEED_CMPXCHG_1_2_EMU. This will cross lib and architectures, which should be OK because it is just a name change. We collect acks as before.5. Convert
cmpxchg_emu_u8()away fromuintptr_t, and, if needed,cmpxchg_emu_u16() as well.
Quoted 6 lines
Quoted 4 lines
This could take a merge window or three to get in, but that is not all that bad for cross-architecture patch serieses such as this one.
Bradley, Vineet, thoughts?
Sound like a plan, buy hey its Bradley doing all the work here ;-)
I figured that I should give him the chance, but yes, if he declines I will of course do any needed additional work.
Quoted 4 lines
I would only add something I mentioned before: download the cross toolchains and do some build testing locally before posting. This is not because arch maintainers are busy or lazy (although they can be both) - that saves potential respins induced by new code or even broken existing code exposed.
Agreed!!!
Quoted 3 lines
And on that topic I just found a gcc 16 ICE when building an allyesconfig for ARC. I will only be able to post the gcc fix after LPC, but just FYI in case someone runs into it.
Thanks for the heads up.
Thanx, Paul
Quoted 144 lines · Bradley Morgan
Quoted 143 lines · Vineet Gupta
Quoted 3 lines · Paul E. McKenney
Quoted 2 lines · Vineet Gupta
Quoted 1 line · Bradley Morgan
On 24 September 2026 21:52:55 BST, Vineet Gupta <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines · kernel test robot
Quoted 3 lines
tree: https://github.com/paulmckrcu/linux cmpxchg2.2026.09.22a head: 54c282c15475ebfae4712fe3ab637c9d19c723d6 commit: b6d4f6af38f85e7948fd64f9bf09cbb858b4dade [25/28] ARC:Emulate
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
two-byte cmpxchg
Quoted 1 line
config: arc-allyesconfig
(https://download.01.org/0day-ci/archive/20260924/[email protected]/config)
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
compiler: arc-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build):(https://download.01.org/0day-ci/archive/20260924/[email protected]/reproduce)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
If you fix the issue in a separate patch/commit (i.e. not just a new
version of
Quoted 3 lines
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes:https://lore.kernel.org/oe-kbuild-all/[email protected]/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
All errors (new ones prefixed by >>):
In file included from arch/arc/include/asm/atomic.h:13, from include/linux/atomic.h:7, from include/asm-generic/bitops/lock.h:5, from arch/arc/include/asm/bitops.h:190, from include/linux/bitops.h:67, from include/linux/log2.h:12, from include/asm-generic/div64.h:55, from
./arch/arc/include/generated/asm/div64.h:1,Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
from include/linux/math.h:6, from include/linux/math64.h:6, from include/linux/time.h:6, from include/linux/stat.h:19, from include/linux/fs_dirent.h:5, from include/linux/fs/super_types.h:5, from include/linux/fs/super.h:5, from include/linux/fs.h:5, from include/linux/fscrypt.h:16, from fs/crypto/fscrypt_private.h:15, from fs/crypto/hooks.c:10: fs/crypto/hooks.c: In function 'fscrypt_get_symlink':Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h:46:58: error: pointer type mismatchin
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
conditional expression [-Wincompatible-pointer-types]
Quoted 1 line
46 | unsigned long _new_ = (unsigned long)(0 ?
*(_p_) :
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
(new)); \
Issue is in
fs/crypto/hooks.cdoing cmpxchg_release(&inode->i_link,NULL,
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
pstr.name)
wherei_linkis char * and pstr.name is unsigned char *),The problem is when pointer types are incompatible and that's exactly
the
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 5 lines
W toggle above.
So Bradley's patch needs this fixup
(quoted diff) +0
-0
b/arch/arc/include/asm/cmpxchg.hQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
arch/arc/include/asm/cmpxchg.h line 45
Quoted 8 lines
index
4596edfefa95..9053098bb152100644arch/arc/include/asm/cmpxchg.h +0
-1@@ -42,8 +42,10 @@ #define arch_cmpxchg_relaxed(ptr, old, new) \ ({ \ __typeof__(ptr) _p_ = (ptr); \ - unsigned long _old_ = (unsigned long)(0 ? *(_p_) : (old));\
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arc/include/asm/cmpxchg.h line 46
Quoted 1 line
arch/arc/include/asm/cmpxchg.h +0
-1- unsigned long _new_ = (unsigned long)(0 ? *(_p_) : (new));\
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
arch/arc/include/asm/cmpxchg.h +4
-0+ __typeof__(*(ptr)) _o_ = (old); \ + __typeof__(*(ptr)) _n_ = (new); \ + unsigned long _old_ = (unsigned long)_o_; \ + unsigned long _new_ = (unsigned long)_n_; \
P.S: For arch changes shouldn't the submitter be required to at leasttest
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the building, specially when this involves the macro maze. Its really
easy
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
with crosstool hosting all the cross-compilers [1] - just download
and
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
untar.
[1]
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/16.2.0/
Quoted 11 lines
Quoted 2 lines
Quoted 1 line
Well thanks but I didn't have a proper server till yesterday.
A relatively decent laptop works for me.
And you will get *way* faster response time than waiting on kernel test robot. ;-)
Quoted 4 lines
Quoted 1 line
I'll post all arch patches when Paul tells me how he wants it
Please do a minimal compile build - it will save you the re-spins.
Quoted 1 line
Like if he wants u16 in first then arch changes sent.
First, I queued Vineet's cmpxchg patch from his pull request to Linus. I have marked it "EXP" so that I don't accidentally ship it off
somewhere
Quoted 34 lines
myself.
Given the surprises from the u8/u16 changes, I suggest the following:
1. One patch to add
cmpxchg_emu_u16(), but without the u8/u16
changes. And without theCONFIG_ARCH_NEED_CMPXCHG_1_2_EMUchange.At Bradley's option,
cmpxchg_emu_u8()could remain as is, withcmpxchg_emu_u16()being born as u16. The upside is less churn
later. The downside is that more up-front testing is needed,
and thus greater interaction with busy architecture maintainers. If it was me, I would start withcmpxchg_emu_u16()being as close tocmpxchg_emu_u8()as possible in order to "get the camel's nose into the tent" as quickly and easily as possible. But this is Bradley's patch series, so his choice.2. One patch each to add use of
cmpxchg_emu_u16()to each
affected architecture.3. Given #1, each patch for #2 can go in independently. The patches
for #2 of course need acks from their respective maintainers.4. A patch to rename
CONFIG_ARCH_NEED_CMPXCHG_1_EMUto
CONFIG_ARCH_NEED_CMPXCHG_1_2_EMU. This will cross lib and architectures, which should be OK because it is just a name change. We collect acks as before.5. Convert
cmpxchg_emu_u8()away fromuintptr_t, and, if needed,cmpxchg_emu_u16() as well.This could take a merge window or three to get in, but that is not all that bad for cross-architecture patch serieses such as this one.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Bradley, Vineet, thoughts?
Sound like a plan, buy hey its Bradley doing all the work here ;-)
Hmm, I'd prefer to leave u16 as is, I'll send the rename patch in the coming hours/days, I have school
Fair enough, your choice!
Quoted 5 lines
Quoted 5 lines
I would only add something I mentioned before: download the cross toolchains and do some build testing locally before posting. This is not because arch maintainers are busy or lazy (although they can be both) - that saves potential respins induced by new code or even broken existing code exposed.
Of course, this choice increases the urgency of Vineet's cross-toolchain suggestion due to the larger difference in code from cmpxchg_emu_u8(). The more the differences, the greater the chance of something going wrong and the greater the value of timely cross-toolchain build checks.
Thanx, Paul
Quoted 10 lines
Quoted 7 lines
And on that topic I just found a gcc 16 ICE when building an allyesconfig for ARC. I will only be able to post the gcc fix after LPC, but just FYI in case someone runs into it.
Thx,
-Vineet--- Thanks!
"I'm not a very positive person" - Linus torvalds