llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] LoongArch: Enable 128-bit atomics cmpxchg support
       [not found] <20251120-2-v1-2-705bdc440550@linux.dev>
@ 2025-11-20 10:37 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-20 10:37 UTC (permalink / raw)
  To: George Guo, Huacai Chen, WANG Xuerui
  Cc: llvm, oe-kbuild-all, loongarch, linux-kernel, George Guo

Hi George,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8b690556d8fe074b4f9835075050fba3fb180e93]

url:    https://github.com/intel-lab-lkp/linux/commits/George-Guo/LoongArch-Add-128-bit-atomic-cmpxchg-support/20251120-160152
base:   8b690556d8fe074b4f9835075050fba3fb180e93
patch link:    https://lore.kernel.org/r/20251120-2-v1-2-705bdc440550%40linux.dev
patch subject: [PATCH 2/2] LoongArch: Enable 128-bit atomics cmpxchg support
config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20251120/202511201828.xfphUVkJ-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251120/202511201828.xfphUVkJ-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511201828.xfphUVkJ-lkp@intel.com/

All errors (new ones prefixed by >>):

>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $a2, 0                           
         |                       ^
>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $a3, 0                           
         |                       ^
>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $a5, 0                           
         |                       ^
>> mm/slub.c:766:9: error: immediate must be a multiple of 4 in the range [-32768, 32764]
     766 |         return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
         |                ^
   mm/slab.h:22:32: note: expanded from macro 'try_cmpxchg_freelist'
      22 | # define try_cmpxchg_freelist           try_cmpxchg128
         |                                         ^
   include/linux/atomic/atomic-instrumented.h:4956:2: note: expanded from macro 'try_cmpxchg128'
    4956 |         raw_try_cmpxchg128(__ai_ptr, __ai_oldp, __VA_ARGS__); \
         |         ^
   include/linux/atomic/atomic-arch-fallback.h:326:9: note: expanded from macro 'raw_try_cmpxchg128'
     326 |         ___r = raw_cmpxchg128((_ptr), ___o, (_new)); \
         |                ^
   include/linux/atomic/atomic-arch-fallback.h:141:24: note: expanded from macro 'raw_cmpxchg128'
     141 | #define raw_cmpxchg128 arch_cmpxchg128
         |                        ^
   arch/loongarch/include/asm/cmpxchg.h:244:2: note: expanded from macro 'arch_cmpxchg128'
     244 |         __cmpxchg128_asm("ll.d", "sc.d", ptr, o, n);                    \
         |         ^
   arch/loongarch/include/asm/cmpxchg.h:137:3: note: expanded from macro '__cmpxchg128_asm'
     137 |         "     " st "  $t0, $t1, %2                           \n"        \
         |          ^
   <inline asm>:7:23: note: instantiated into assembly here
       7 |      sc.d  $t0, $t1, $t3, 0                           
         |                       ^
   4 errors generated.


vim +766 mm/slub.c

881db7fb03a77a Christoph Lameter 2011-06-01  756  
6801be4f2653e5 Peter Zijlstra    2023-05-31  757  static inline bool
6801be4f2653e5 Peter Zijlstra    2023-05-31  758  __update_freelist_fast(struct slab *slab,
6801be4f2653e5 Peter Zijlstra    2023-05-31  759  		      void *freelist_old, unsigned long counters_old,
6801be4f2653e5 Peter Zijlstra    2023-05-31  760  		      void *freelist_new, unsigned long counters_new)
6801be4f2653e5 Peter Zijlstra    2023-05-31  761  {
6801be4f2653e5 Peter Zijlstra    2023-05-31  762  #ifdef system_has_freelist_aba
6801be4f2653e5 Peter Zijlstra    2023-05-31  763  	freelist_aba_t old = { .freelist = freelist_old, .counter = counters_old };
6801be4f2653e5 Peter Zijlstra    2023-05-31  764  	freelist_aba_t new = { .freelist = freelist_new, .counter = counters_new };
6801be4f2653e5 Peter Zijlstra    2023-05-31  765  
6801be4f2653e5 Peter Zijlstra    2023-05-31 @766  	return try_cmpxchg_freelist(&slab->freelist_counter.full, &old.full, new.full);
6801be4f2653e5 Peter Zijlstra    2023-05-31  767  #else
6801be4f2653e5 Peter Zijlstra    2023-05-31  768  	return false;
6801be4f2653e5 Peter Zijlstra    2023-05-31  769  #endif
6801be4f2653e5 Peter Zijlstra    2023-05-31  770  }
6801be4f2653e5 Peter Zijlstra    2023-05-31  771  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-20 10:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20251120-2-v1-2-705bdc440550@linux.dev>
2025-11-20 10:37 ` [PATCH 2/2] LoongArch: Enable 128-bit atomics cmpxchg support kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).