[csky-linux:riscv_compat_v2_sv48_v3_xtpbmt 32/32] arch/riscv/errata/thead/errata.c:40:50: error: '__riscv_svpbmt' undeclared

From: kernel test robot
Date: Wed Dec 29 2021 - 18:16:27 EST


tree: https://github.com/c-sky/csky-linux riscv_compat_v2_sv48_v3_xtpbmt
head: ff10a70d2ed4fbef7238b315145d1aa0d137f80f
commit: ff10a70d2ed4fbef7238b315145d1aa0d137f80f [32/32] riscv: errata: pgtable: Add custom Svpbmt supported for Allwinner D1
config: riscv-buildonly-randconfig-r002-20211230 (https://download.01.org/0day-ci/archive/20211230/202112300758.KEBcJ4W5-lkp@xxxxxxxxx/config)
compiler: riscv32-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/c-sky/csky-linux/commit/ff10a70d2ed4fbef7238b315145d1aa0d137f80f
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux riscv_compat_v2_sv48_v3_xtpbmt
git checkout ff10a70d2ed4fbef7238b315145d1aa0d137f80f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

arch/riscv/errata/thead/errata.c: In function 'thead_errata_setup_vm':
>> arch/riscv/errata/thead/errata.c:40:50: error: '__riscv_svpbmt' undeclared (first use in this function)
40 | pgprot_val(protection_map[i]) |= __riscv_svpbmt.mt_pma;
| ^~~~~~~~~~~~~~
arch/riscv/errata/thead/errata.c:40:50: note: each undeclared identifier is reported only once for each function it appears in

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SERIAL_8250_DW
Depends on TTY && HAS_IOMEM && SERIAL_8250
Selected by
- ERRATA_THEAD && RISCV_ERRATA_ALTERNATIVE


vim +/__riscv_svpbmt +40 arch/riscv/errata/thead/errata.c

38
39 for (i = 0; i < 16; i++)
> 40 pgprot_val(protection_map[i]) |= __riscv_svpbmt.mt_pma;

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