[asahilinux:audio/testing 28/167] drivers/nvme/host/apple.c:255: undefined reference to `apple_sart_add_allowed_region'

From: kernel test robot
Date: Sat Mar 12 2022 - 22:24:03 EST


tree: https://github.com/AsahiLinux/linux audio/testing
head: 878d09efcd811ce17adb15d9ee32a5b7130320b5
commit: 73ad3599aa16b102655fbd9aa1576ae3c63466a3 [28/167] WIP: nvme-apple: add initial Apple SoC NVMe driver
config: openrisc-buildonly-randconfig-r003-20220313 (https://download.01.org/0day-ci/archive/20220313/202203131109.2etgybVw-lkp@xxxxxxxxx/config)
compiler: or1k-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/AsahiLinux/linux/commit/73ad3599aa16b102655fbd9aa1576ae3c63466a3
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux audio/testing
git checkout 73ad3599aa16b102655fbd9aa1576ae3c63466a3
# 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=openrisc 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 >>):

or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_sart_dma_setup':
>> drivers/nvme/host/apple.c:255: undefined reference to `apple_sart_add_allowed_region'
drivers/nvme/host/apple.c:255:(.text+0x13c0): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_sart_add_allowed_region'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_disable':
>> drivers/nvme/host/apple.c:800: undefined reference to `apple_rtkit_is_crashed'
drivers/nvme/host/apple.c:800:(.text+0x19dc): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_is_crashed'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_shutdown':
>> drivers/nvme/host/apple.c:1436: undefined reference to `apple_rtkit_is_running'
drivers/nvme/host/apple.c:1436:(.text+0x1be4): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_is_running'
>> or1k-linux-ld: drivers/nvme/host/apple.c:1437: undefined reference to `apple_rtkit_shutdown'
drivers/nvme/host/apple.c:1437:(.text+0x1c00): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_shutdown'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_remove':
drivers/nvme/host/apple.c:1425: undefined reference to `apple_rtkit_is_running'
drivers/nvme/host/apple.c:1425:(.text+0x1c84): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_is_running'
or1k-linux-ld: drivers/nvme/host/apple.c:1426: undefined reference to `apple_rtkit_shutdown'
drivers/nvme/host/apple.c:1426:(.text+0x1ca0): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_shutdown'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_timeout':
drivers/nvme/host/apple.c:899: undefined reference to `apple_rtkit_is_crashed'
drivers/nvme/host/apple.c:899:(.text+0x1e58): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_is_crashed'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_reset_work':
drivers/nvme/host/apple.c:984: undefined reference to `apple_rtkit_is_crashed'
drivers/nvme/host/apple.c:984:(.text+0x2020): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_is_crashed'
>> or1k-linux-ld: drivers/nvme/host/apple.c:995: undefined reference to `apple_rtkit_is_running'
drivers/nvme/host/apple.c:995:(.text+0x20e4): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_is_running'
>> or1k-linux-ld: drivers/nvme/host/apple.c:1009: undefined reference to `apple_rtkit_reinit'
drivers/nvme/host/apple.c:1009:(.text+0x2130): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `apple_rtkit_reinit'
>> or1k-linux-ld: drivers/nvme/host/apple.c:1020: undefined reference to `apple_rtkit_boot'
drivers/nvme/host/apple.c:1020:(.text+0x2170): additional relocation overflows omitted from the output
or1k-linux-ld: drivers/nvme/host/apple.c:997: undefined reference to `apple_rtkit_shutdown'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_sart_dma_destroy':
>> drivers/nvme/host/apple.c:272: undefined reference to `apple_sart_remove_allowed_region'
or1k-linux-ld: drivers/nvme/host/apple.o: in function `apple_nvme_probe':
>> drivers/nvme/host/apple.c:1341: undefined reference to `apple_sart_get'
>> or1k-linux-ld: drivers/nvme/host/apple.c:1393: undefined reference to `devm_apple_rtkit_init'


vim +255 drivers/nvme/host/apple.c

241
242 static int apple_nvme_sart_dma_setup(void *cookie, struct apple_rtkit_shmem *bfr,
243 dma_addr_t iova, size_t size)
244 {
245 struct apple_nvme *anv = cookie;
246 int ret;
247
248 if (iova)
249 return -EINVAL;
250
251 bfr->buffer = dma_alloc_coherent(anv->dev, size, &iova, GFP_KERNEL);
252 if (!bfr->buffer)
253 return -ENOMEM;
254
> 255 ret = apple_sart_add_allowed_region(anv->sart, iova, size);
256 if (ret) {
257 dma_free_coherent(anv->dev, size, bfr->buffer, iova);
258 bfr->buffer = NULL;
259 return -ENOMEM;
260 }
261
262 bfr->size = size;
263 bfr->iova = iova;
264
265 return 0;
266 }
267
268 static void apple_nvme_sart_dma_destroy(void *cookie, struct apple_rtkit_shmem *bfr)
269 {
270 struct apple_nvme *anv = cookie;
271
> 272 apple_sart_remove_allowed_region(anv->sart, bfr->iova, bfr->size);
273 dma_free_coherent(anv->dev, bfr->size, bfr->buffer, bfr->iova);
274 }
275

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