Hi Paul, On Thu, 2024-04-04 at 10:44 -0700, Paul E. McKenney wrote: > On Thu, Apr 04, 2024 at 05:13:20AM +0800, kernel test robot wrote: > > tree: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > > master > > head: 727900b675b749c40ba1f6669c7ae5eb7eb8e837 > > commit: df35ee400e06b23ecd44fdb66451a5343932f834 [2524/3504] riscv: > > Emulate one-byte and two-byte cmpxchg > > config: riscv-nommu_virt_defconfig > > (https://download.01.org/0day-ci/archive/20240404/202404040526.GVza > > L2io-lkp@xxxxxxxxx/config) > > compiler: clang version 19.0.0git > > (https://github.com/llvm/llvm-project 546dc2245ffc4cccd0b05b58b7a59 > > 55e355a3b27) > > reproduce (this is a W=1 build): > > (https://download.01.org/0day-ci/archive/20240404/202404040526.GVza > > L2io-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx> > > > Closes: > > > https://lore.kernel.org/oe-kbuild-all/202404040526.GVzaL2io-lkp@xxxxxxxxx/ > > I believe that this is fixed by the following updated commit in -rcu: > > 27011e7159ef ("riscv: Emulate one-byte cmpxchg") > > But please let me know if I am missing something. Sorry for the delay of reply due to we were on public holidays in the last few days. The error still exists on the updated commit. Commit 27011e7159ef added the uintptr_t cast for __old and __new only in the first occurrence of __ret assignment, but missed that in the remaining __ret assignments. Seems it needs another fixup as below: ------------------------------------------------------------------- diff --git a/arch/riscv/include/asm/cmpxchg.h b/arch/riscv/include/asm/cmpxchg.h index abcd5543b861b..a9803825567cf 100644 --- a/arch/riscv/include/asm/cmpxchg.h +++ b/arch/riscv/include/asm/cmpxchg.h @@ -219,7 +219,7 @@ register unsigned int __rc; \ switch (size) { \ case 1: \ - __ret = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ + __ret = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 4: \ __asm__ __volatile__ ( \ @@ -268,7 +268,7 @@ register unsigned int __rc; \ switch (size) { \ case 1: \ - __ret = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ + __ret = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 4: \ __asm__ __volatile__ ( \ @@ -317,7 +317,7 @@ register unsigned int __rc; \ switch (size) { \ case 1: \ - __ret = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ + __ret = (__typeof__(*(ptr)))cmpxchg_emu_u8((volatile u8 *)__ptr, (uintptr_t)__old, (uintptr_t)__new); \ break; \ case 4: \ __asm__ __volatile__ ( \ -- Thanks, Yujie > Thanx, Paul > > > All errors (new ones prefixed by >>): > > > > In file included from kernel/locking/rtmutex_api.c:9: > > > > kernel/locking/rtmutex.c:218:9: error: incompatible pointer to > > > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka > > > > 'struct task_struct *') to parameter of type 'uintptr_t' (aka > > > > 'unsigned long') [-Wint-conversion] > > 218 | return try_cmpxchg_acquire(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4889:2: note: > > expanded from macro 'try_cmpxchg_acquire' > > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:210:9: note: > > expanded from macro 'raw_try_cmpxchg_acquire' > > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:65:29: note: > > expanded from macro 'raw_cmpxchg_acquire' > > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > > | ^ > > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from > > macro 'arch_cmpxchg_acquire' > > 264 | (__typeof__(*(ptr))) > > __cmpxchg_acquire((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:225:48: note: expanded from > > macro '__cmpxchg_acquire' > > 225 | __ret = cmpxchg_emu_u8((volatile u8 > > *)__ptr, __old, __new); \ > > > > | > > ^~~~~ > > include/linux/cmpxchg-emu.h:13:52: note: passing argument to > > parameter 'old' here > > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, > > uintptr_t new); > > | ^ > > In file included from kernel/locking/rtmutex_api.c:9: > > > > kernel/locking/rtmutex.c:218:9: error: incompatible pointer to > > > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka > > > > 'struct task_struct *') to parameter of type 'uintptr_t' (aka > > > > 'unsigned long') [-Wint-conversion] > > 218 | return try_cmpxchg_acquire(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4889:2: note: > > expanded from macro 'try_cmpxchg_acquire' > > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:210:9: note: > > expanded from macro 'raw_try_cmpxchg_acquire' > > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:65:29: note: > > expanded from macro 'raw_cmpxchg_acquire' > > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > > | ^ > > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from > > macro 'arch_cmpxchg_acquire' > > 264 | (__typeof__(*(ptr))) > > __cmpxchg_acquire((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:225:55: note: expanded from > > macro '__cmpxchg_acquire' > > 225 | __ret = cmpxchg_emu_u8((volatile u8 > > *)__ptr, __old, __new); \ > > > > | > > ^~~~~ > > include/linux/cmpxchg-emu.h:13:67: note: passing argument to > > parameter 'new' here > > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, > > uintptr_t new); > > > > | > > ^ > > In file included from kernel/locking/rtmutex_api.c:9: > > > > kernel/locking/rtmutex.c:218:9: error: incompatible integer to > > > > pointer conversion assigning to 'typeof (*(((__ai_ptr))))' (aka > > > > 'struct task_struct *') from 'uintptr_t' (aka 'unsigned long') > > > > [-Wint-conversion] > > 218 | return try_cmpxchg_acquire(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4889:2: note: > > expanded from macro 'try_cmpxchg_acquire' > > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:210:9: note: > > expanded from macro 'raw_try_cmpxchg_acquire' > > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:65:29: note: > > expanded from macro 'raw_cmpxchg_acquire' > > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > > | ^ > > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from > > macro 'arch_cmpxchg_acquire' > > 264 | (__typeof__(*(ptr))) > > __cmpxchg_acquire((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:225:9: note: expanded from > > macro '__cmpxchg_acquire' > > 225 | __ret = cmpxchg_emu_u8((volatile u8 > > *)__ptr, __old, __new); \ > > | ^ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > In file included from kernel/locking/rtmutex_api.c:9: > > > > kernel/locking/rtmutex.c:218:9: error: incompatible pointer to > > > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka > > > > 'struct task_struct *') to parameter of type 'uintptr_t' (aka > > > > 'unsigned long') [-Wint-conversion] > > 218 | return try_cmpxchg_acquire(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4889:2: note: > > expanded from macro 'try_cmpxchg_acquire' > > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:210:9: note: > > expanded from macro 'raw_try_cmpxchg_acquire' > > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:65:29: note: > > expanded from macro 'raw_cmpxchg_acquire' > > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > > | ^ > > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from > > macro 'arch_cmpxchg_acquire' > > 264 | (__typeof__(*(ptr))) > > __cmpxchg_acquire((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:229:50: note: expanded from > > macro '__cmpxchg_acquire' > > 229 | __ret = cmpxchg_emu_u16((volatile u16 > > *)__ptr, __old, __new); \ > > > > | > > ^~~~~ > > include/linux/cmpxchg-emu.h:14:54: note: passing argument to > > parameter 'old' here > > 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t > > old, uintptr_t new); > > | ^ > > In file included from kernel/locking/rtmutex_api.c:9: > > > > kernel/locking/rtmutex.c:218:9: error: incompatible pointer to > > > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka > > > > 'struct task_struct *') to parameter of type 'uintptr_t' (aka > > > > 'unsigned long') [-Wint-conversion] > > 218 | return try_cmpxchg_acquire(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4889:2: note: > > expanded from macro 'try_cmpxchg_acquire' > > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:210:9: note: > > expanded from macro 'raw_try_cmpxchg_acquire' > > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:65:29: note: > > expanded from macro 'raw_cmpxchg_acquire' > > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > > | ^ > > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from > > macro 'arch_cmpxchg_acquire' > > 264 | (__typeof__(*(ptr))) > > __cmpxchg_acquire((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:229:57: note: expanded from > > macro '__cmpxchg_acquire' > > 229 | __ret = cmpxchg_emu_u16((volatile u16 > > *)__ptr, __old, __new); \ > > > > | > > ^~~~~ > > include/linux/cmpxchg-emu.h:14:69: note: passing argument to > > parameter 'new' here > > 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t > > old, uintptr_t new); > > > > | > > ^ > > In file included from kernel/locking/rtmutex_api.c:9: > > > > kernel/locking/rtmutex.c:218:9: error: incompatible integer to > > > > pointer conversion assigning to 'typeof (*(((__ai_ptr))))' (aka > > > > 'struct task_struct *') from 'uintptr_t' (aka 'unsigned long') > > > > [-Wint-conversion] > > 218 | return try_cmpxchg_acquire(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4889:2: note: > > expanded from macro 'try_cmpxchg_acquire' > > 4889 | raw_try_cmpxchg_acquire(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:210:9: note: > > expanded from macro 'raw_try_cmpxchg_acquire' > > 210 | ___r = raw_cmpxchg_acquire((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:65:29: note: > > expanded from macro 'raw_cmpxchg_acquire' > > 65 | #define raw_cmpxchg_acquire arch_cmpxchg_acquire > > | ^ > > arch/riscv/include/asm/cmpxchg.h:264:23: note: expanded from > > macro 'arch_cmpxchg_acquire' > > 264 | (__typeof__(*(ptr))) > > __cmpxchg_acquire((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 265 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:229:9: note: expanded from > > macro '__cmpxchg_acquire' > > 229 | __ret = cmpxchg_emu_u16((volatile u16 > > *)__ptr, __old, __new); \ > > | ^ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > In file included from kernel/locking/rtmutex_api.c:9: > > kernel/locking/rtmutex.c:230:9: error: incompatible pointer to > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct > > task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned > > long') [-Wint-conversion] > > 230 | return try_cmpxchg_release(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4899:2: note: > > expanded from macro 'try_cmpxchg_release' > > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:228:9: note: > > expanded from macro 'raw_try_cmpxchg_release' > > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:77:29: note: > > expanded from macro 'raw_cmpxchg_release' > > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > > | ^ > > arch/riscv/include/asm/cmpxchg.h:316:23: note: expanded from > > macro 'arch_cmpxchg_release' > > 316 | (__typeof__(*(ptr))) > > __cmpxchg_release((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 317 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:277:48: note: expanded from > > macro '__cmpxchg_release' > > 277 | __ret = cmpxchg_emu_u8((volatile u8 > > *)__ptr, __old, __new); \ > > > > | > > ^~~~~ > > include/linux/cmpxchg-emu.h:13:52: note: passing argument to > > parameter 'old' here > > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, > > uintptr_t new); > > | ^ > > In file included from kernel/locking/rtmutex_api.c:9: > > kernel/locking/rtmutex.c:230:9: error: incompatible pointer to > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct > > task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned > > long') [-Wint-conversion] > > 230 | return try_cmpxchg_release(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4899:2: note: > > expanded from macro 'try_cmpxchg_release' > > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:228:9: note: > > expanded from macro 'raw_try_cmpxchg_release' > > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:77:29: note: > > expanded from macro 'raw_cmpxchg_release' > > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > > | ^ > > arch/riscv/include/asm/cmpxchg.h:316:23: note: expanded from > > macro 'arch_cmpxchg_release' > > 316 | (__typeof__(*(ptr))) > > __cmpxchg_release((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 317 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:277:55: note: expanded from > > macro '__cmpxchg_release' > > 277 | __ret = cmpxchg_emu_u8((volatile u8 > > *)__ptr, __old, __new); \ > > > > | > > ^~~~~ > > include/linux/cmpxchg-emu.h:13:67: note: passing argument to > > parameter 'new' here > > 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, > > uintptr_t new); > > > > | > > ^ > > In file included from kernel/locking/rtmutex_api.c:9: > > kernel/locking/rtmutex.c:230:9: error: incompatible integer to > > pointer conversion assigning to 'typeof (*(((__ai_ptr))))' (aka > > 'struct task_struct *') from 'uintptr_t' (aka 'unsigned long') [- > > Wint-conversion] > > 230 | return try_cmpxchg_release(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4899:2: note: > > expanded from macro 'try_cmpxchg_release' > > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:228:9: note: > > expanded from macro 'raw_try_cmpxchg_release' > > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:77:29: note: > > expanded from macro 'raw_cmpxchg_release' > > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > > | ^ > > arch/riscv/include/asm/cmpxchg.h:316:23: note: expanded from > > macro 'arch_cmpxchg_release' > > 316 | (__typeof__(*(ptr))) > > __cmpxchg_release((ptr), \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > 317 | _o_, _n_, > > sizeof(*(ptr))); \ > > | > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/riscv/include/asm/cmpxchg.h:277:9: note: expanded from > > macro '__cmpxchg_release' > > 277 | __ret = cmpxchg_emu_u8((volatile u8 > > *)__ptr, __old, __new); \ > > | ^ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > In file included from kernel/locking/rtmutex_api.c:9: > > kernel/locking/rtmutex.c:230:9: error: incompatible pointer to > > integer conversion passing 'typeof (*(((__ai_ptr))))' (aka 'struct > > task_struct *') to parameter of type 'uintptr_t' (aka 'unsigned > > long') [-Wint-conversion] > > 230 | return try_cmpxchg_release(&lock->owner, &old, > > new); > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-instrumented.h:4899:2: note: > > expanded from macro 'try_cmpxchg_release' > > 4899 | raw_try_cmpxchg_release(__ai_ptr, __ai_oldp, > > __VA_ARGS__); \ > > | > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:228:9: note: > > expanded from macro 'raw_try_cmpxchg_release' > > 228 | ___r = raw_cmpxchg_release((_ptr), ___o, > > (_new)); \ > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > include/linux/atomic/atomic-arch-fallback.h:77:29: note: > > expanded from macro 'raw_cmpxchg_release' > > 77 | #define raw_cmpxchg_release arch_cmpxchg_release > > > > > > vim +218 kernel/locking/rtmutex.c > > > > 23f78d4a03c53c kernel/rtmutex.c Ingo Molnar > > 2006-06-27 208 > > bd197234b0a616 kernel/rtmutex.c Thomas Gleixner > > 2007-06-17 209 /* > > cede88418b385b kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2015-02-25 210 * We can speed up the acquire/release, if there's > > no debugging state to be > > cede88418b385b kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2015-02-25 211 * set up. > > bd197234b0a616 kernel/rtmutex.c Thomas Gleixner > > 2007-06-17 212 */ > > cede88418b385b kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2015-02-25 213 #ifndef CONFIG_DEBUG_RT_MUTEXES > > 830e6acc8a1caf kernel/locking/rtmutex.c Peter Zijlstra > > 2021-08-15 214 static __always_inline bool > > rt_mutex_cmpxchg_acquire(struct rt_mutex_base *lock, > > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2021-08-15 215 > > struct task_struct *old, > > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2021-08-15 216 > > struct task_struct *new) > > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2021-08-15 217 { > > 709e0b62869f62 kernel/locking/rtmutex.c Thomas Gleixner > > 2021-08-15 @218 return try_cmpxchg_acquire(&lock->owner, > > &old, new); > > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2021-08-15 219 } > > 785159301bedea kernel/locking/rtmutex.c Sebastian Andrzej Siewior > > 2021-08-15 220 > > > > :::::: The code at line 218 was first introduced by commit > > :::::: 709e0b62869f625afd18edd79f190c38cb39dfb2 locking/rtmutex: > > Switch to from cmpxchg_*() to try_cmpxchg_*() > > > > :::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > > :::::: CC: Ingo Molnar <mingo@xxxxxxxxxx> > > > > -- > > 0-DAY CI Kernel Test Service > > https://github.com/intel/lkp-tests/wiki >