Skip to contentSkip to conversation

arch/x86/xen/enlighten_pv.c:118:24: sparse: sparse: incorrect type in initializer (different address spaces)

DISCUSSION kernel test robot 1 participant 1 message Dec 14, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw

Hi Brian,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4a298a43f5e339f48d2dda0665c02b88ee9a4e03
commit: 1ab7b5ed44ba9bce581e225f40219b793bc779d6 x86/xen: Move Xen upcall handler
date:   9 months ago
config: x86_64-randconfig-123-20251213 (https://download.01.org/0day-ci/archive/20251214/[email protected]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251214/[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]/

sparse warnings: (new ones prefixed by >>)

>> arch/x86/xen/enlighten_pv.c:118:24: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got bool * @@

arch/x86/xen/enlighten_pv.c:118:24: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/xen/enlighten_pv.c:118:24: sparse: got bool *
arch/x86/xen/enlighten_pv.c:120:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got bool * @@
arch/x86/xen/enlighten_pv.c:120:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/xen/enlighten_pv.c:120:9: sparse: got bool *
arch/x86/xen/enlighten_pv.c:126:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got bool * @@
arch/x86/xen/enlighten_pv.c:126:9: sparse: expected void const [noderef] __percpu *__vpp_verify
arch/x86/xen/enlighten_pv.c:126:9: sparse: got bool *

vim +118 arch/x86/xen/enlighten_pv.c

111
112 /*
113 * In case of scheduling the flag must be cleared and restored after
114 * returning from schedule as the task might move to a different CPU.
115 */
116 static __always_inline bool get_and_clear_inhcall(void)
117 {

 > 118		bool inhcall = __this_cpu_read(xen_in_preemptible_hcall);

119
120 __this_cpu_write(xen_in_preemptible_hcall, false);
121 return inhcall;
122 }
123

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