[kbusch:dma-prereg-v5 5/6] arch/riscv/include/asm/atomic.h:75: undefined reference to `io_dma_unmap'

From: kernel test robot
Date: Tue Jul 26 2022 - 10:35:38 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git dma-prereg-v5
head: 4f4a93bf02dcf20e9a4a3ac0c9cd39d79e9e540e
commit: 1b0c9acb050749ce7ad964cc66eef72779835832 [5/6] io_uring: add support for dma pre-mapping
config: riscv-randconfig-s052-20220726 (https://download.01.org/0day-ci/archive/20220726/202207262203.Z4p6l0Zg-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git/commit/?id=1b0c9acb050749ce7ad964cc66eef72779835832
git remote add kbusch https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git
git fetch --no-tags kbusch dma-prereg-v5
git checkout 1b0c9acb050749ce7ad964cc66eef72779835832
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

init/main.o: in function `.L0 ':
include/linux/list.h:292:(.text+0x22): relocation truncated to fit: R_RISCV_HI20 against `.LANCHOR0'
init/main.o: in function `.L0 ':
init/main.c:185:(.init.text+0x6): relocation truncated to fit: R_RISCV_HI20 against symbol `reset_devices' defined in .sbss section in init/main.o
init/main.c:1419:(.text.unlikely+0x2a): relocation truncated to fit: R_RISCV_HI20 against `.LANCHOR0'
init/main.c:685:(.ref.text+0xe): relocation truncated to fit: R_RISCV_HI20 against `kernel_init'
init/do_mounts.o: in function `.L0 ':
init/do_mounts.c:279:(.text+0x22): relocation truncated to fit: R_RISCV_HI20 against `.LC15'
init/do_mounts.c:45:(.init.text+0xa): relocation truncated to fit: R_RISCV_HI20 against `.LC0'
init/do_mounts_initrd.o: in function `.L0 ':
init/do_mounts_initrd.c:44:(.init.text+0xa): relocation truncated to fit: R_RISCV_HI20 against `.LC0'
init/initramfs.o: in function `.L0 ':
init/initramfs.c:739:(.text+0x8): relocation truncated to fit: R_RISCV_HI20 against `initramfs_cookie'
init/initramfs.c:57:(.init.text+0xa): relocation truncated to fit: R_RISCV_HI20 against `.LC0'
init/calibrate.o: in function `.L0 ':
arch/riscv/include/asm/timex.h:20:(.text+0x6): relocation truncated to fit: R_RISCV_HI20 against symbol `clint_time_val' defined in .sbss section in drivers/clocksource/timer-clint.o
init/calibrate.o: in function `.L0 ':
init/calibrate.c:19:(.init.text+0x1c): additional relocation overflows omitted from the output
riscv64-linux-ld: io_uring/rsrc.o: in function `.LVL65':
>> arch/riscv/include/asm/atomic.h:75: undefined reference to `io_dma_unmap'


vim +75 arch/riscv/include/asm/atomic.h

fab957c11efe2f Palmer Dabbelt 2017-07-10 73
4650d02ad2d9b2 Palmer Dabbelt 2017-11-14 74 ATOMIC_OPS(add, add, i)
4650d02ad2d9b2 Palmer Dabbelt 2017-11-14 @75 ATOMIC_OPS(sub, add, -i)
4650d02ad2d9b2 Palmer Dabbelt 2017-11-14 76 ATOMIC_OPS(and, and, i)
4650d02ad2d9b2 Palmer Dabbelt 2017-11-14 77 ATOMIC_OPS( or, or, i)
4650d02ad2d9b2 Palmer Dabbelt 2017-11-14 78 ATOMIC_OPS(xor, xor, i)
fab957c11efe2f Palmer Dabbelt 2017-07-10 79

:::::: The code at line 75 was first introduced by commit
:::::: 4650d02ad2d9b2c1c7aa36055166db6aee68f72e RISC-V: Remove unused arguments from ATOMIC_OP

:::::: TO: Palmer Dabbelt <palmer@xxxxxxxxxxx>
:::::: CC: Palmer Dabbelt <palmer@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp