arch/x86/kernel/callthunks.c:303:20: sparse: sparse: incorrect type in initializer (different address spaces)

From: kernel test robot
Date: Thu Sep 28 2023 - 16:28:36 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9ed22ae6be817d7a3f5c15ca22cbc9d3963b481d
commit: f5c1bb2afe93396d41c5cbdcb909b08a75b8dde4 x86/calldepth: Add ret/call counting for debug
date: 12 months ago
config: x86_64-randconfig-121-20230929 (https://download.01.org/0day-ci/archive/20230929/202309290455.MMN9bxIp-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230929/202309290455.MMN9bxIp-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/202309290455.MMN9bxIp-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/x86/kernel/callthunks.c:303:20: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/x86/kernel/callthunks.c:303:20: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/kernel/callthunks.c:303:20: sparse: got unsigned long long *
arch/x86/kernel/callthunks.c:306:20: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long long * @@
arch/x86/kernel/callthunks.c:306:20: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/kernel/callthunks.c:306:20: sparse: got unsigned long long *

vim +303 arch/x86/kernel/callthunks.c

296
297 #if defined(CONFIG_CALL_THUNKS_DEBUG) && defined(CONFIG_DEBUG_FS)
298 static int callthunks_debug_show(struct seq_file *m, void *p)
299 {
300 unsigned long cpu = (unsigned long)m->private;
301
302 seq_printf(m, "C: %16llu R: %16llu S: %16llu X: %16llu\n,",
> 303 per_cpu(__x86_call_count, cpu),
304 per_cpu(__x86_ret_count, cpu),
305 per_cpu(__x86_stuffs_count, cpu),
306 per_cpu(__x86_ctxsw_count, cpu));
307 return 0;
308 }
309

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