arch/loongarch/kernel/paravirt.c:15:1: sparse: sparse: symbol '__pcpu_scope_steal_time' was not declared. Should it be static?

From: kernel test robot

Date: Wed May 06 2026 - 01:45:40 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 74fe02ce122a6103f207d29fafc8b3a53de6abaf
commit: c43dce6f13fb12144571c168c7a593e5e546f3b5 LoongArch: KVM: Make vcpu_is_preempted() as a macro rather than function
date: 4 weeks ago
config: loongarch-randconfig-r134-20260505 (https://download.01.org/0day-ci/archive/20260506/202605061313.O8Hswm2b-lkp@xxxxxxxxx/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605061313.O8Hswm2b-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
| Fixes: c43dce6f13fb ("LoongArch: KVM: Make vcpu_is_preempted() as a macro rather than function")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605061313.O8Hswm2b-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kernel/paravirt.c:15:1: sparse: sparse: symbol '__pcpu_scope_steal_time' was not declared. Should it be static?
arch/loongarch/kernel/paravirt.c: note: in included file (through arch/loongarch/include/asm/loongarch.h, arch/loongarch/include/asm/cpu-info.h, arch/loongarch/include/asm/cpu-features.h, ...):
/opt/cross/clang-5bac06718f/lib/clang/23/include/larchintrin.h:202:24: sparse: sparse: undefined identifier '__builtin_loongarch_cpucfg'
/opt/cross/clang-5bac06718f/lib/clang/23/include/larchintrin.h:202:11: sparse: sparse: cast from unknown type
/opt/cross/clang-5bac06718f/lib/clang/23/include/larchintrin.h:202:11: sparse: sparse: cast from unknown type

vim +/__pcpu_scope_steal_time +15 arch/loongarch/kernel/paravirt.c

11
12 static int has_steal_clock;
13 DEFINE_STATIC_KEY_FALSE(virt_preempt_key);
14 DEFINE_STATIC_KEY_FALSE(virt_spin_lock_key);
> 15 DEFINE_PER_CPU(struct kvm_steal_time, steal_time) __aligned(64);
16

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