[mark:arm64/percpu-fixup 17/17] arch/arm64/include/asm/percpu.h:330:1: warning: value size does not match register size specified by the constraint and modifier

kernel test robot <[email protected]> Thu, 30 Jul 2026 18:00:05 +0800
Newsgroups dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/percpu-fixup
head:   d1bf23b2ad173d4e8810016cbc69f2fb8f33ca93
commit: d1bf23b2ad173d4e8810016cbc69f2fb8f33ca93 [17/17] WIP: improve extension in this_cpu_cmpxchg*()
config: arm64-randconfig-002-20260730 (https://download.01.org/0day-ci/archive/20260730/[email protected]/config)
compiler: clang version 21.1.8 (https://github.com/llvm/llvm-project 2078da43e25a4623cab2d0d60decddf709aaea28)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260730/[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 warnings (new ones prefixed by >>):

   In file included from arch/arm64/kernel/asm-offsets.c:11:
   In file included from include/linux/arm_sdei.h:8:
   In file included from include/acpi/ghes.h:5:
   In file included from include/acpi/apei.h:9:
   In file included from include/linux/acpi.h:14:
   In file included from include/linux/resource_ext.h:11:
   In file included from include/linux/slab.h:17:
   In file included from include/linux/gfp.h:7:
   In file included from include/linux/mmzone.h:8:
   In file included from include/linux/spinlock.h:59:
   In file included from include/linux/irqflags.h:19:
>> arch/arm64/include/asm/percpu.h:330:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     330 | PERCPU_CMPXCHG_OP(w, b, 8)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:330:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:331:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     331 | PERCPU_CMPXCHG_OP(w, h, 16)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:331:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:332:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     332 | PERCPU_CMPXCHG_OP(w,  , 32)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:332:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   3 warnings generated.
--
   In file included from drivers/gpu/drm/pl111/pl111_versatile.c:13:
   In file included from include/linux/device.h:15:
   In file included from include/linux/dev_printk.h:16:
   In file included from include/linux/ratelimit.h:6:
   In file included from include/linux/sched.h:13:
   In file included from arch/arm64/include/asm/processor.h:47:
   In file included from arch/arm64/include/asm/spectre.h:17:
>> arch/arm64/include/asm/percpu.h:330:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     330 | PERCPU_CMPXCHG_OP(w, b, 8)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:330:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:331:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     331 | PERCPU_CMPXCHG_OP(w, h, 16)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:331:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:332:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     332 | PERCPU_CMPXCHG_OP(w,  , 32)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:332:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   drivers/gpu/drm/pl111/pl111_versatile.c:489:24: warning: cast to smaller integer type 'enum versatile_clcd' from 'const void *' [-Wvoid-pointer-to-enum-cast]
     489 |         versatile_clcd_type = (enum versatile_clcd)clcd_id->data;
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/pl111/pl111_versatile.c:509:26: warning: cast to smaller integer type 'enum versatile_clcd' from 'const void *' [-Wvoid-pointer-to-enum-cast]
     509 |                         versatile_clcd_type = (enum versatile_clcd)clcd_id->data;
         |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 warnings generated.
--
   In file included from arch/arm64/kernel/asm-offsets.c:11:
   In file included from include/linux/arm_sdei.h:8:
   In file included from include/acpi/ghes.h:5:
   In file included from include/acpi/apei.h:9:
   In file included from include/linux/acpi.h:14:
   In file included from include/linux/resource_ext.h:11:
   In file included from include/linux/slab.h:17:
   In file included from include/linux/gfp.h:7:
   In file included from include/linux/mmzone.h:8:
   In file included from include/linux/spinlock.h:59:
   In file included from include/linux/irqflags.h:19:
>> arch/arm64/include/asm/percpu.h:330:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     330 | PERCPU_CMPXCHG_OP(w, b, 8)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:330:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:331:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     331 | PERCPU_CMPXCHG_OP(w, h, 16)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:331:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:332:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     332 | PERCPU_CMPXCHG_OP(w,  , 32)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:332:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   3 warnings generated.
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:8:
   In file included from include/linux/prandom.h:13:
   In file included from include/linux/percpu.h:5:
   In file included from include/linux/alloc_tag.h:12:
>> arch/arm64/include/asm/percpu.h:330:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     330 | PERCPU_CMPXCHG_OP(w, b, 8)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:330:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:331:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     331 | PERCPU_CMPXCHG_OP(w, h, 16)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:331:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:332:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     332 | PERCPU_CMPXCHG_OP(w,  , 32)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:332:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   3 warnings generated.
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:24:
   In file included from arch/arm64/include/asm/vdso/gettimeofday.h:15:
   In file included from arch/arm64/include/asm/arch_timer.h:18:
   In file included from include/linux/percpu.h:5:
   In file included from include/linux/alloc_tag.h:12:
>> arch/arm64/include/asm/percpu.h:330:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     330 | PERCPU_CMPXCHG_OP(w, b, 8)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:330:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:331:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     331 | PERCPU_CMPXCHG_OP(w, h, 16)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:331:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   arch/arm64/include/asm/percpu.h:332:1: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
     332 | PERCPU_CMPXCHG_OP(w,  , 32)
         | ^
   arch/arm64/include/asm/percpu.h:317:15: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     317 |           [old] "r" (xw_zero_extend(old, sz)),                          \
         |                      ^
   arch/arm64/include/asm/atomic_ll_sc.h:248:31: note: expanded from macro 'xw_zero_extend'
     248 | #define xw_zero_extend(v, sz)   ((xwreg_t_##sz)(u##sz)(v))
         |                                 ^
   arch/arm64/include/asm/percpu.h:332:1: note: use constraint modifier "w"
   arch/arm64/include/asm/percpu.h:306:19: note: expanded from macro 'PERCPU_CMPXCHG_OP'
     306 |         "       mov     %[oldval], %[old]\n"                            \
         |                                    ^
   3 warnings generated.


vim +330 arch/arm64/include/asm/percpu.h

c03dfaa3c7ed10 Mark Rutland 2026-07-22  329  
27fb4c5ba7a4fb Mark Rutland 2026-07-22 @330  PERCPU_CMPXCHG_OP(w, b, 8)
27fb4c5ba7a4fb Mark Rutland 2026-07-22  331  PERCPU_CMPXCHG_OP(w, h, 16)
27fb4c5ba7a4fb Mark Rutland 2026-07-22  332  PERCPU_CMPXCHG_OP(w,  , 32)
27fb4c5ba7a4fb Mark Rutland 2026-07-22  333  PERCPU_CMPXCHG_OP(x,  , 64)
27fb4c5ba7a4fb Mark Rutland 2026-07-22  334  

:::::: The code at line 330 was first introduced by commit
:::::: 27fb4c5ba7a4fb529f6ad0ae5ea0ea4197cb477d arm64: percpu: Implement preemptible CMPXCHG ops

:::::: TO: Mark Rutland <[email protected]>
:::::: CC: Mark Rutland <[email protected]>

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