[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508201452.ciEgfhNO-lkp@intel.com>
Date: Wed, 20 Aug 2025 14:44:54 +0800
From: kernel test robot <lkp@...el.com>
To: Yunhui Cui <cuiyunhui@...edance.com>, yury.norov@...il.com,
linux@...musvillemoes.dk, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu, alex@...ti.fr,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
dennis@...nel.org, tj@...nel.org, cl@...two.org, linux-mm@...ck.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
Yunhui Cui <cuiyunhui@...edance.com>
Subject: Re: [PATCH 2/2] riscv: introduce percpu.h into include/asm
Hi Yunhui,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on dennis-percpu/for-next v6.17-rc2 next-20250819]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yunhui-Cui/riscv-remove-irqflags-h-inclusion-in-asm-bitops-h/20250819-215256
base: linus/master
patch link: https://lore.kernel.org/r/20250819135007.85646-3-cuiyunhui%40bytedance.com
patch subject: [PATCH 2/2] riscv: introduce percpu.h into include/asm
config: riscv-randconfig-002-20250820 (https://download.01.org/0day-ci/archive/20250820/202508201452.ciEgfhNO-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250820/202508201452.ciEgfhNO-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508201452.ciEgfhNO-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/riscv/kernel/asm-offsets.c:8:
In file included from include/linux/mm.h:7:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
In file included from include/linux/mm_types.h:19:
In file included from include/linux/workqueue.h:9:
>> include/linux/alloc_tag.h:219:2: warning: implicit conversion from 'typeof (tag->counters->calls)' (aka 'unsigned long long') to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
219 | this_cpu_dec(tag->counters->calls);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:512:28: note: expanded from macro 'this_cpu_dec'
512 | #define this_cpu_dec(pcp) this_cpu_sub(pcp, 1)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:510:51: note: expanded from macro 'this_cpu_sub'
510 | #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:501:70: note: expanded from macro 'this_cpu_add'
501 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/percpu-defs.h:372:29: note: expanded from macro '__pcpu_size_call'
372 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
arch/riscv/include/asm/percpu.h:96:78: note: expanded from macro 'this_cpu_add_8'
96 | #define this_cpu_add_8(pcp, val) _pcp_protect(__percpu_add_amo_case_64, pcp, val)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
arch/riscv/include/asm/percpu.h:72:26: note: expanded from macro '_pcp_protect'
72 | op(raw_cpu_ptr(&(pcp)), __VA_ARGS__); \
| ~~ ^~~~~~~~~~~
1 warning generated.
--
In file included from arch/riscv/errata/sifive/errata.c:7:
In file included from include/linux/memory.h:19:
In file included from include/linux/node.h:18:
In file included from include/linux/device.h:16:
In file included from include/linux/energy_model.h:7:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:12:
In file included from include/linux/idr.h:15:
In file included from include/linux/radix-tree.h:16:
In file included from include/linux/percpu.h:5:
>> include/linux/alloc_tag.h:219:2: warning: implicit conversion from 'typeof (tag->counters->calls)' (aka 'unsigned long long') to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
219 | this_cpu_dec(tag->counters->calls);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:512:28: note: expanded from macro 'this_cpu_dec'
512 | #define this_cpu_dec(pcp) this_cpu_sub(pcp, 1)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:510:51: note: expanded from macro 'this_cpu_sub'
510 | #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:501:70: note: expanded from macro 'this_cpu_add'
501 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/percpu-defs.h:372:29: note: expanded from macro '__pcpu_size_call'
372 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
arch/riscv/include/asm/percpu.h:96:78: note: expanded from macro 'this_cpu_add_8'
96 | #define this_cpu_add_8(pcp, val) _pcp_protect(__percpu_add_amo_case_64, pcp, val)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
arch/riscv/include/asm/percpu.h:72:26: note: expanded from macro '_pcp_protect'
72 | op(raw_cpu_ptr(&(pcp)), __VA_ARGS__); \
| ~~ ^~~~~~~~~~~
arch/riscv/errata/sifive/errata.c:29:14: warning: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
29 | if (arch_id != 0x8000000000000007 ||
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
arch/riscv/errata/sifive/errata.c:42:14: warning: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
42 | if (arch_id != 0x8000000000000007 && arch_id != 0x1)
| ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
3 warnings generated.
--
In file included from arch/riscv/kernel/asm-offsets.c:8:
In file included from include/linux/mm.h:7:
In file included from include/linux/gfp.h:7:
In file included from include/linux/mmzone.h:22:
In file included from include/linux/mm_types.h:19:
In file included from include/linux/workqueue.h:9:
>> include/linux/alloc_tag.h:219:2: warning: implicit conversion from 'typeof (tag->counters->calls)' (aka 'unsigned long long') to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
219 | this_cpu_dec(tag->counters->calls);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:512:28: note: expanded from macro 'this_cpu_dec'
512 | #define this_cpu_dec(pcp) this_cpu_sub(pcp, 1)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:510:51: note: expanded from macro 'this_cpu_sub'
510 | #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:501:70: note: expanded from macro 'this_cpu_add'
501 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
include/linux/percpu-defs.h:372:29: note: expanded from macro '__pcpu_size_call'
372 | case 8: stem##8(variable, __VA_ARGS__);break; \
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
arch/riscv/include/asm/percpu.h:96:78: note: expanded from macro 'this_cpu_add_8'
96 | #define this_cpu_add_8(pcp, val) _pcp_protect(__percpu_add_amo_case_64, pcp, val)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
arch/riscv/include/asm/percpu.h:72:26: note: expanded from macro '_pcp_protect'
72 | op(raw_cpu_ptr(&(pcp)), __VA_ARGS__); \
| ~~ ^~~~~~~~~~~
1 warning generated.
vim +219 include/linux/alloc_tag.h
22d407b164ff79 Suren Baghdasaryan 2024-03-21 202
22d407b164ff79 Suren Baghdasaryan 2024-03-21 203 static inline void alloc_tag_sub(union codetag_ref *ref, size_t bytes)
22d407b164ff79 Suren Baghdasaryan 2024-03-21 204 {
22d407b164ff79 Suren Baghdasaryan 2024-03-21 205 struct alloc_tag *tag;
22d407b164ff79 Suren Baghdasaryan 2024-03-21 206
22d407b164ff79 Suren Baghdasaryan 2024-03-21 207 alloc_tag_sub_check(ref);
22d407b164ff79 Suren Baghdasaryan 2024-03-21 208 if (!ref || !ref->ct)
22d407b164ff79 Suren Baghdasaryan 2024-03-21 209 return;
22d407b164ff79 Suren Baghdasaryan 2024-03-21 210
239d6c96d86f8a Suren Baghdasaryan 2024-03-21 211 if (is_codetag_empty(ref)) {
239d6c96d86f8a Suren Baghdasaryan 2024-03-21 212 ref->ct = NULL;
239d6c96d86f8a Suren Baghdasaryan 2024-03-21 213 return;
239d6c96d86f8a Suren Baghdasaryan 2024-03-21 214 }
239d6c96d86f8a Suren Baghdasaryan 2024-03-21 215
22d407b164ff79 Suren Baghdasaryan 2024-03-21 216 tag = ct_to_alloc_tag(ref->ct);
22d407b164ff79 Suren Baghdasaryan 2024-03-21 217
22d407b164ff79 Suren Baghdasaryan 2024-03-21 218 this_cpu_sub(tag->counters->bytes, bytes);
22d407b164ff79 Suren Baghdasaryan 2024-03-21 @219 this_cpu_dec(tag->counters->calls);
22d407b164ff79 Suren Baghdasaryan 2024-03-21 220
22d407b164ff79 Suren Baghdasaryan 2024-03-21 221 ref->ct = NULL;
22d407b164ff79 Suren Baghdasaryan 2024-03-21 222 }
22d407b164ff79 Suren Baghdasaryan 2024-03-21 223
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists