[PATCH] RDMA/umem: fix missing automated rename
kernel test robot
lkp at intel.com
Mon Jun 7 10:32:57 UTC 2021
Hi "Christian,
I love your patch! Yet something to improve:
[auto build test ERROR on rdma/for-next]
[also build test ERROR on tegra-drm/drm/tegra/for-next v5.13-rc5 next-20210604]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Christian-K-nig/RDMA-umem-fix-missing-automated-rename/20210607-150846
base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: mips-randconfig-r031-20210607 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/6a174683a13a824a00a001d656d1a1c2fb469ab8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christian-K-nig/RDMA-umem-fix-missing-automated-rename/20210607-150846
git checkout 6a174683a13a824a00a001d656d1a1c2fb469ab8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All error/warnings (new ones prefixed by >>):
drivers/infiniband/core/umem_dmabuf.c: In function 'ib_umem_dmabuf_map_pages':
>> drivers/infiniband/core/umem_dmabuf.c:69:10: error: implicit declaration of function 'dma_resv_excl_fence'; did you mean 'dma_resv_add_excl_fence'? [-Werror=implicit-function-declaration]
69 | fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
| ^~~~~~~~~~~~~~~~~~~
| dma_resv_add_excl_fence
>> drivers/infiniband/core/umem_dmabuf.c:69:8: warning: assignment to 'struct dma_fence *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
69 | fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
| ^
cc1: some warnings being treated as errors
vim +69 drivers/infiniband/core/umem_dmabuf.c
11
12 int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
13 {
14 struct sg_table *sgt;
15 struct scatterlist *sg;
16 struct dma_fence *fence;
17 unsigned long start, end, cur = 0;
18 unsigned int nmap = 0;
19 int i;
20
21 dma_resv_assert_held(umem_dmabuf->attach->dmabuf->resv);
22
23 if (umem_dmabuf->sgt)
24 goto wait_fence;
25
26 sgt = dma_buf_map_attachment(umem_dmabuf->attach, DMA_BIDIRECTIONAL);
27 if (IS_ERR(sgt))
28 return PTR_ERR(sgt);
29
30 /* modify the sg list in-place to match umem address and length */
31
32 start = ALIGN_DOWN(umem_dmabuf->umem.address, PAGE_SIZE);
33 end = ALIGN(umem_dmabuf->umem.address + umem_dmabuf->umem.length,
34 PAGE_SIZE);
35 for_each_sgtable_dma_sg(sgt, sg, i) {
36 if (start < cur + sg_dma_len(sg) && cur < end)
37 nmap++;
38 if (cur <= start && start < cur + sg_dma_len(sg)) {
39 unsigned long offset = start - cur;
40
41 umem_dmabuf->first_sg = sg;
42 umem_dmabuf->first_sg_offset = offset;
43 sg_dma_address(sg) += offset;
44 sg_dma_len(sg) -= offset;
45 cur += offset;
46 }
47 if (cur < end && end <= cur + sg_dma_len(sg)) {
48 unsigned long trim = cur + sg_dma_len(sg) - end;
49
50 umem_dmabuf->last_sg = sg;
51 umem_dmabuf->last_sg_trim = trim;
52 sg_dma_len(sg) -= trim;
53 break;
54 }
55 cur += sg_dma_len(sg);
56 }
57
58 umem_dmabuf->umem.sg_head.sgl = umem_dmabuf->first_sg;
59 umem_dmabuf->umem.sg_head.nents = nmap;
60 umem_dmabuf->umem.nmap = nmap;
61 umem_dmabuf->sgt = sgt;
62
63 wait_fence:
64 /*
65 * Although the sg list is valid now, the content of the pages
66 * may be not up-to-date. Wait for the exporter to finish
67 * the migration.
68 */
> 69 fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
70 if (fence)
71 return dma_fence_wait(fence, false);
72
73 return 0;
74 }
75 EXPORT_SYMBOL(ib_umem_dmabuf_map_pages);
76
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 39136 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210607/11fb0ac8/attachment-0001.gz>
More information about the dri-devel
mailing list