ld.lld: error: undefined symbol: zap_vma_ptes

From: kernel test robot
Date: Wed May 12 2021 - 14:38:28 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 88b06399c9c766c283e070b022b5ceafa4f63f19
commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
date: 8 weeks ago
config: riscv-randconfig-r023-20210512 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 179209fa12709a3df8888c323b37315da2683c24
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv

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

All errors (new ones prefixed by >>):

ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: undefined symbol: zap_vma_ptes
>>> referenced by vfio_pci.c
>>> vfio/pci/vfio_pci.o:(vfio_pci_zap_and_vma_lock) in archive drivers/built-in.a
>>> referenced by vfio_pci.c
>>> vfio/pci/vfio_pci.o:(vfio_pci_mmap_open) in archive drivers/built-in.a

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

Attachment: .config.gz
Description: application/gzip