arch/arm64/kvm/hyp/vhe/switch.c:217:17: sparse: sparse: symbol 'hyp_panic' was not declared. Should it be static?

From: kernel test robot
Date: Thu May 13 2021 - 18:33:27 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 315d99318179b9cd5077ccc9f7f26a164c9fa998
commit: f79e616f27ab6cd74deb0995a8eead3d1c9d65af KVM: arm64: Use BUG and BUG_ON in nVHE hyp
date: 6 weeks ago
config: arm64-randconfig-s032-20210513 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f79e616f27ab6cd74deb0995a8eead3d1c9d65af
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f79e616f27ab6cd74deb0995a8eead3d1c9d65af
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arm64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
--

vim +/hyp_panic +217 arch/arm64/kvm/hyp/vhe/switch.c

09cf57eba30424 David Brazdil 2020-06-25 214 }
09cf57eba30424 David Brazdil 2020-06-25 215 NOKPROBE_SYMBOL(__hyp_call_panic);
09cf57eba30424 David Brazdil 2020-06-25 216
6a0259ed29bba8 Andrew Scull 2020-09-15 @217 void __noreturn hyp_panic(void)
09cf57eba30424 David Brazdil 2020-06-25 218 {
09cf57eba30424 David Brazdil 2020-06-25 219 u64 spsr = read_sysreg_el2(SYS_SPSR);
09cf57eba30424 David Brazdil 2020-06-25 220 u64 elr = read_sysreg_el2(SYS_ELR);
96d389ca10110d Rob Herring 2020-10-28 221 u64 par = read_sysreg_par();
09cf57eba30424 David Brazdil 2020-06-25 222
6a0259ed29bba8 Andrew Scull 2020-09-15 223 __hyp_call_panic(spsr, elr, par);
09cf57eba30424 David Brazdil 2020-06-25 224 unreachable();

:::::: The code at line 217 was first introduced by commit
:::::: 6a0259ed29bba83653a36fabcdf6b06aecd78596 KVM: arm64: Remove hyp_panic arguments

:::::: TO: Andrew Scull <ascull@xxxxxxxxxx>
:::::: CC: Marc Zyngier <maz@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip