arch/arm64/kvm/hyp/nvhe/stacktrace.c:40:1: sparse: sparse: symbol '__pcpu_scope_pkvm_stacktrace' was not declared. Should it be static?

From: kernel test robot

Date: Sun Jun 14 2026 - 03:49:32 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2b07ea76fd28989bde5993532d7a943a6f90e246
commit: 9019e82c7e46c03c37e8b108473d02b543222d9f KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC
date: 3 months ago
config: arm64-randconfig-r112-20260614 (https://download.01.org/0day-ci/archive/20260614/202606141506.NrUXwjy5-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260614/202606141506.NrUXwjy5-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: 9019e82c7e46 ("KVM: arm64: Add PKVM_DISABLE_STAGE2_ON_PANIC")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606141506.NrUXwjy5-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
arch/arm64/kvm/hyp/nvhe/stacktrace.c:12:1: sparse: sparse: symbol '__pcpu_scope_overflow_stack' was not declared. Should it be static?
arch/arm64/kvm/hyp/nvhe/stacktrace.c:15:1: sparse: sparse: symbol '__pcpu_scope_kvm_stacktrace_info' was not declared. Should it be static?
>> arch/arm64/kvm/hyp/nvhe/stacktrace.c:40:1: sparse: sparse: symbol '__pcpu_scope_pkvm_stacktrace' was not declared. Should it be static?

vim +/__pcpu_scope_pkvm_stacktrace +40 arch/arm64/kvm/hyp/nvhe/stacktrace.c

871c5d931417d3 Kalesh Singh 2022-07-26 39
6928bcc84bc4bd Kalesh Singh 2022-07-26 @40 DEFINE_PER_CPU(unsigned long [NVHE_STACKTRACE_SIZE/sizeof(long)], pkvm_stacktrace);
871c5d931417d3 Kalesh Singh 2022-07-26 41

:::::: The code at line 40 was first introduced by commit
:::::: 6928bcc84bc4bd9a24a1cb1986418c3de76e1d99 KVM: arm64: Allocate shared pKVM hyp stacktrace buffers

:::::: TO: Kalesh Singh <kaleshsingh@xxxxxxxxxx>
:::::: CC: Marc Zyngier <maz@xxxxxxxxxx>

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