All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/umem: fix missing automated rename
@ 2021-06-07  7:06 Christian König
  2021-06-07 10:20   ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Christian König @ 2021-06-07  7:06 UTC (permalink / raw)
  To: daniel.vetter, dri-devel

This occasions was missed during the recent rename of the function.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/infiniband/core/umem_dmabuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c
index 0d65ce146fc4..c6e875619fac 100644
--- a/drivers/infiniband/core/umem_dmabuf.c
+++ b/drivers/infiniband/core/umem_dmabuf.c
@@ -66,7 +66,7 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
 	 * may be not up-to-date. Wait for the exporter to finish
 	 * the migration.
 	 */
-	fence = dma_resv_get_excl(umem_dmabuf->attach->dmabuf->resv);
+	fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
 	if (fence)
 		return dma_fence_wait(fence, false);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] RDMA/umem: fix missing automated rename
  2021-06-07  7:06 [PATCH] RDMA/umem: fix missing automated rename Christian König
@ 2021-06-07 10:20   ` kernel test robot
  2021-06-07 10:32   ` kernel test robot
  2021-06-07 11:01 ` Christian König
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-07 10:20 UTC (permalink / raw)
  To: Christian König, daniel.vetter, dri-devel
  Cc: clang-built-linux, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 11153 bytes --]

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: powerpc-randconfig-r035-20210607 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ae973380c5f6be77ce395022be40350942260be9)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # 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=clang make.cross ARCH=powerpc 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:175:1: note: expanded from here
   __do_insb
   ^
   arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
   #define __do_insb(p, b, n)      readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:179:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:183:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:187:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:191:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:195:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> drivers/infiniband/core/umem_dmabuf.c:69:10: error: implicit declaration of function 'dma_resv_excl_fence' [-Werror,-Wimplicit-function-declaration]
           fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
                   ^
   drivers/infiniband/core/umem_dmabuf.c:69:10: note: did you mean 'dma_resv_add_excl_fence'?
   include/linux/dma-resv.h:279:6: note: 'dma_resv_add_excl_fence' declared here
   void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence);
        ^
   drivers/infiniband/core/umem_dmabuf.c:69:8: warning: incompatible integer to pointer conversion assigning to 'struct dma_fence *' from 'int' [-Wint-conversion]
           fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   14 warnings and 1 error generated.


vim +/dma_resv_excl_fence +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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23170 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] RDMA/umem: fix missing automated rename
@ 2021-06-07 10:20   ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-07 10:20 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 11371 bytes --]

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: powerpc-randconfig-r035-20210607 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ae973380c5f6be77ce395022be40350942260be9)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # 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=clang make.cross ARCH=powerpc 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:175:1: note: expanded from here
   __do_insb
   ^
   arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
   #define __do_insb(p, b, n)      readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:179:1: note: expanded from here
   __do_insw
   ^
   arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
   #define __do_insw(p, b, n)      readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:183:1: note: expanded from here
   __do_insl
   ^
   arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
   #define __do_insl(p, b, n)      readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
                                          ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:187:1: note: expanded from here
   __do_outsb
   ^
   arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
   #define __do_outsb(p, b, n)     writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:191:1: note: expanded from here
   __do_outsw
   ^
   arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
   #define __do_outsw(p, b, n)     writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
   In file included from drivers/infiniband/core/umem_dmabuf.c:6:
   In file included from include/linux/dma-buf.h:16:
   In file included from include/linux/dma-buf-map.h:9:
   In file included from include/linux/io.h:13:
   In file included from arch/powerpc/include/asm/io.h:619:
   arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
   DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
                   __do_##name al;                                 \
                   ^~~~~~~~~~~~~~
   <scratch space>:195:1: note: expanded from here
   __do_outsl
   ^
   arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
   #define __do_outsl(p, b, n)     writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
                                           ~~~~~~~~~~~~~~~~~~~~~^
>> drivers/infiniband/core/umem_dmabuf.c:69:10: error: implicit declaration of function 'dma_resv_excl_fence' [-Werror,-Wimplicit-function-declaration]
           fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
                   ^
   drivers/infiniband/core/umem_dmabuf.c:69:10: note: did you mean 'dma_resv_add_excl_fence'?
   include/linux/dma-resv.h:279:6: note: 'dma_resv_add_excl_fence' declared here
   void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence);
        ^
   drivers/infiniband/core/umem_dmabuf.c:69:8: warning: incompatible integer to pointer conversion assigning to 'struct dma_fence *' from 'int' [-Wint-conversion]
           fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   14 warnings and 1 error generated.


vim +/dma_resv_excl_fence +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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23170 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] RDMA/umem: fix missing automated rename
  2021-06-07  7:06 [PATCH] RDMA/umem: fix missing automated rename Christian König
@ 2021-06-07 10:32   ` kernel test robot
  2021-06-07 10:32   ` kernel test robot
  2021-06-07 11:01 ` Christian König
  2 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-07 10:32 UTC (permalink / raw)
  To: Christian König, daniel.vetter, dri-devel; +Cc: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4553 bytes --]

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@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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39136 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] RDMA/umem: fix missing automated rename
@ 2021-06-07 10:32   ` kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-07 10:32 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4667 bytes --]

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@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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39136 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] RDMA/umem: fix missing automated rename
  2021-06-07  7:06 [PATCH] RDMA/umem: fix missing automated rename Christian König
  2021-06-07 10:20   ` kernel test robot
  2021-06-07 10:32   ` kernel test robot
@ 2021-06-07 11:01 ` Christian König
  2021-06-07 13:37   ` Alex Deucher
  2 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2021-06-07 11:01 UTC (permalink / raw)
  To: daniel.vetter, dri-devel, Thomas Hellström, Jason Ekstrand

Ping. Can anybody give me a quick rb or ack-by?

The driver currently doesn't compile without this on the drm-misc-next 
branch.

Thanks,
Christian.

Am 07.06.21 um 09:06 schrieb Christian König:
> This occasions was missed during the recent rename of the function.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>   drivers/infiniband/core/umem_dmabuf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c
> index 0d65ce146fc4..c6e875619fac 100644
> --- a/drivers/infiniband/core/umem_dmabuf.c
> +++ b/drivers/infiniband/core/umem_dmabuf.c
> @@ -66,7 +66,7 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
>   	 * may be not up-to-date. Wait for the exporter to finish
>   	 * the migration.
>   	 */
> -	fence = dma_resv_get_excl(umem_dmabuf->attach->dmabuf->resv);
> +	fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
>   	if (fence)
>   		return dma_fence_wait(fence, false);
>   


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] RDMA/umem: fix missing automated rename
  2021-06-07 11:01 ` Christian König
@ 2021-06-07 13:37   ` Alex Deucher
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2021-06-07 13:37 UTC (permalink / raw)
  To: Christian König
  Cc: Daniel Vetter, Jason Ekstrand, Maling list - DRI developers,
	Thomas Hellström

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

On Mon, Jun 7, 2021 at 7:01 AM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> Ping. Can anybody give me a quick rb or ack-by?
>
> The driver currently doesn't compile without this on the drm-misc-next
> branch.
>
> Thanks,
> Christian.
>
> Am 07.06.21 um 09:06 schrieb Christian König:
> > This occasions was missed during the recent rename of the function.
> >
> > Signed-off-by: Christian König <christian.koenig@amd.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
> >   drivers/infiniband/core/umem_dmabuf.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c
> > index 0d65ce146fc4..c6e875619fac 100644
> > --- a/drivers/infiniband/core/umem_dmabuf.c
> > +++ b/drivers/infiniband/core/umem_dmabuf.c
> > @@ -66,7 +66,7 @@ int ib_umem_dmabuf_map_pages(struct ib_umem_dmabuf *umem_dmabuf)
> >        * may be not up-to-date. Wait for the exporter to finish
> >        * the migration.
> >        */
> > -     fence = dma_resv_get_excl(umem_dmabuf->attach->dmabuf->resv);
> > +     fence = dma_resv_excl_fence(umem_dmabuf->attach->dmabuf->resv);
> >       if (fence)
> >               return dma_fence_wait(fence, false);
> >
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-07 13:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  7:06 [PATCH] RDMA/umem: fix missing automated rename Christian König
2021-06-07 10:20 ` kernel test robot
2021-06-07 10:20   ` kernel test robot
2021-06-07 10:32 ` kernel test robot
2021-06-07 10:32   ` kernel test robot
2021-06-07 11:01 ` Christian König
2021-06-07 13:37   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.