arch/riscv/mm/kasan_init.c:28:7: sparse: sparse: symbol 'tmp_pud' was not declared. Should it be static?
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6aeadf7896bff4ca230702daba8788455e6b866e commit: 96f9d4daf745205fe869e9e5ac23199ef11c5448 riscv: Rework kasan population functions date: 2 months ago config: riscv-randconfig-r083-20230628 (https://download.01.org/0day-ci/archive/20230628/[email protected]/config) compiler: riscv64-linux-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230628/[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 >>)
WARNING: invalid argument to '-march': '_zicbom_zihintpause' arch/riscv/mm/kasan_init.c:27:7: sparse: sparse: symbol 'tmp_p4d' was not declared. Should it be static?
>> arch/riscv/mm/kasan_init.c:28:7: sparse: sparse: symbol 'tmp_pud' was not declared. Should it be static?
vim +/tmp_pud +28 arch/riscv/mm/kasan_init.c
13
14 /*
15 * Kasan shadow region must lie at a fixed address across sv39, sv48 and sv57
16 * which is right before the kernel.
17 *
18 * For sv39, the region is aligned on PGDIR_SIZE so we only need to populate
19 * the page global directory with kasan_early_shadow_pmd.
20 *
21 * For sv48 and sv57, the region start is aligned on PGDIR_SIZE whereas the end
22 * region is not and then we have to go down to the PUD level.
23 */
24
25 extern pgd_t early_pg_dir[PTRS_PER_PGD];
26 pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
27 p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss;
> 28 pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss;
29 Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki