diff mbox

[v4,15/16] IB: Add PVRDMA driver

Message ID 1473655766-31628-16-git-send-email-aditr@vmware.com (mailing list archive)
State Superseded
Headers show

Commit Message

Adit Ranadive Sept. 12, 2016, 4:49 a.m. UTC
This patch updates the InfiniBand subsystem to build the PVRDMA driver.

Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Reviewed-by: George Zhang <georgezhang@vmware.com>
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Reviewed-by: Bryan Tan <bryantan@vmware.com>
Signed-off-by: Adit Ranadive <aditr@vmware.com>
---
 drivers/infiniband/Kconfig     | 1 +
 drivers/infiniband/hw/Makefile | 1 +
 2 files changed, 2 insertions(+)

Comments

kernel test robot Sept. 12, 2016, 7:32 a.m. UTC | #1
Hi Adit,

[auto build test ERROR on next-20160909]
[cannot apply to rdma/master net-next/master net/master v4.8-rc6 v4.8-rc5 v4.8-rc4 v4.8-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Adit-Ranadive/Add-Paravirtual-RDMA-Driver/20160912-125631
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/infiniband/hw/pvrdma/pvrdma_misc.c: In function 'pvrdma_page_dir_init':
>> drivers/infiniband/hw/pvrdma/pvrdma_misc.c:75:12: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
               &pdir->dir[i], GFP_KERNEL);
               ^
   In file included from include/linux/pci-dma-compat.h:7:0,
                    from include/linux/pci.h:2112,
                    from drivers/infiniband/hw/pvrdma/pvrdma.h:53,
                    from drivers/infiniband/hw/pvrdma/pvrdma_misc.c:50:
   include/linux/dma-mapping.h:450:21: note: expected 'dma_addr_t * {aka unsigned int *}' but argument is of type 'u64 * {aka long long unsigned int *}'
    static inline void *dma_alloc_coherent(struct device *dev, size_t size,
                        ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/dma_alloc_coherent +75 drivers/infiniband/hw/pvrdma/pvrdma_misc.c

3f4cd1e6 Adit Ranadive 2016-09-11  59  
3f4cd1e6 Adit Ranadive 2016-09-11  60  	memset(pdir, 0, sizeof(*pdir));
3f4cd1e6 Adit Ranadive 2016-09-11  61  
3f4cd1e6 Adit Ranadive 2016-09-11  62  	pdir->dir = dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE,
3f4cd1e6 Adit Ranadive 2016-09-11  63  				       &pdir->dir_dma, GFP_KERNEL);
3f4cd1e6 Adit Ranadive 2016-09-11  64  	if (!pdir->dir)
3f4cd1e6 Adit Ranadive 2016-09-11  65  		goto err;
3f4cd1e6 Adit Ranadive 2016-09-11  66  
3f4cd1e6 Adit Ranadive 2016-09-11  67  	pdir->ntables = PVRDMA_PAGE_DIR_TABLE(npages - 1) + 1;
3f4cd1e6 Adit Ranadive 2016-09-11  68  	pdir->tables = kcalloc(pdir->ntables, sizeof(*pdir->tables),
3f4cd1e6 Adit Ranadive 2016-09-11  69  			       GFP_KERNEL);
3f4cd1e6 Adit Ranadive 2016-09-11  70  	if (!pdir->tables)
3f4cd1e6 Adit Ranadive 2016-09-11  71  		goto err;
3f4cd1e6 Adit Ranadive 2016-09-11  72  
3f4cd1e6 Adit Ranadive 2016-09-11  73  	for (i = 0; i < pdir->ntables; i++) {
3f4cd1e6 Adit Ranadive 2016-09-11  74  		pdir->tables[i] = dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE,
3f4cd1e6 Adit Ranadive 2016-09-11 @75  						     &pdir->dir[i], GFP_KERNEL);
3f4cd1e6 Adit Ranadive 2016-09-11  76  		if (!pdir->tables[i])
3f4cd1e6 Adit Ranadive 2016-09-11  77  			goto err;
3f4cd1e6 Adit Ranadive 2016-09-11  78  	}
3f4cd1e6 Adit Ranadive 2016-09-11  79  
3f4cd1e6 Adit Ranadive 2016-09-11  80  	pdir->npages = npages;
3f4cd1e6 Adit Ranadive 2016-09-11  81  
3f4cd1e6 Adit Ranadive 2016-09-11  82  	if (alloc_pages) {
3f4cd1e6 Adit Ranadive 2016-09-11  83  		pdir->pages = kcalloc(npages, sizeof(*pdir->pages),

:::::: The code at line 75 was first introduced by commit
:::::: 3f4cd1e6dfbd35bd0392c639ef00eb665bcfb308 IB/pvrdma: Add helper functions

:::::: TO: Adit Ranadive <aditr@vmware.com>
:::::: CC: 0day robot <fengguang.wu@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot Sept. 12, 2016, 9 a.m. UTC | #2
Hi Adit,

[auto build test WARNING on next-20160909]
[cannot apply to rdma/master net-next/master net/master v4.8-rc6 v4.8-rc5 v4.8-rc4 v4.8-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Adit-Ranadive/Add-Paravirtual-RDMA-Driver/20160912-125631
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/infiniband/hw/pvrdma/pvrdma_misc.c: In function 'pvrdma_page_dir_init':
>> drivers/infiniband/hw/pvrdma/pvrdma_misc.c:74:21: warning: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type
      pdir->tables[i] = dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE,
                        ^
   In file included from include/linux/pci-dma-compat.h:7:0,
                    from include/linux/pci.h:2112,
                    from drivers/infiniband/hw/pvrdma/pvrdma.h:53,
                    from drivers/infiniband/hw/pvrdma/pvrdma_misc.c:50:
   include/linux/dma-mapping.h:450:21: note: expected 'dma_addr_t *' but argument is of type 'u64 *'
    static inline void *dma_alloc_coherent(struct device *dev, size_t size,
                        ^

vim +/dma_alloc_coherent +74 drivers/infiniband/hw/pvrdma/pvrdma_misc.c

3f4cd1e6 Adit Ranadive 2016-09-11  58  		return -EINVAL;
3f4cd1e6 Adit Ranadive 2016-09-11  59  
3f4cd1e6 Adit Ranadive 2016-09-11  60  	memset(pdir, 0, sizeof(*pdir));
3f4cd1e6 Adit Ranadive 2016-09-11  61  
3f4cd1e6 Adit Ranadive 2016-09-11  62  	pdir->dir = dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE,
3f4cd1e6 Adit Ranadive 2016-09-11  63  				       &pdir->dir_dma, GFP_KERNEL);
3f4cd1e6 Adit Ranadive 2016-09-11  64  	if (!pdir->dir)
3f4cd1e6 Adit Ranadive 2016-09-11  65  		goto err;
3f4cd1e6 Adit Ranadive 2016-09-11  66  
3f4cd1e6 Adit Ranadive 2016-09-11  67  	pdir->ntables = PVRDMA_PAGE_DIR_TABLE(npages - 1) + 1;
3f4cd1e6 Adit Ranadive 2016-09-11  68  	pdir->tables = kcalloc(pdir->ntables, sizeof(*pdir->tables),
3f4cd1e6 Adit Ranadive 2016-09-11  69  			       GFP_KERNEL);
3f4cd1e6 Adit Ranadive 2016-09-11  70  	if (!pdir->tables)
3f4cd1e6 Adit Ranadive 2016-09-11  71  		goto err;
3f4cd1e6 Adit Ranadive 2016-09-11  72  
3f4cd1e6 Adit Ranadive 2016-09-11  73  	for (i = 0; i < pdir->ntables; i++) {
3f4cd1e6 Adit Ranadive 2016-09-11 @74  		pdir->tables[i] = dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE,
3f4cd1e6 Adit Ranadive 2016-09-11  75  						     &pdir->dir[i], GFP_KERNEL);
3f4cd1e6 Adit Ranadive 2016-09-11  76  		if (!pdir->tables[i])
3f4cd1e6 Adit Ranadive 2016-09-11  77  			goto err;
3f4cd1e6 Adit Ranadive 2016-09-11  78  	}
3f4cd1e6 Adit Ranadive 2016-09-11  79  
3f4cd1e6 Adit Ranadive 2016-09-11  80  	pdir->npages = npages;
3f4cd1e6 Adit Ranadive 2016-09-11  81  
3f4cd1e6 Adit Ranadive 2016-09-11  82  	if (alloc_pages) {

:::::: The code at line 74 was first introduced by commit
:::::: 3f4cd1e6dfbd35bd0392c639ef00eb665bcfb308 IB/pvrdma: Add helper functions

:::::: TO: Adit Ranadive <aditr@vmware.com>
:::::: CC: 0day robot <fengguang.wu@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index 19a418a..dff4bcf 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -88,5 +88,6 @@  source "drivers/infiniband/sw/rdmavt/Kconfig"
 source "drivers/infiniband/sw/rxe/Kconfig"
 
 source "drivers/infiniband/hw/hfi1/Kconfig"
+source "drivers/infiniband/hw/pvrdma/Kconfig"
 
 endif # INFINIBAND
diff --git a/drivers/infiniband/hw/Makefile b/drivers/infiniband/hw/Makefile
index 21fe401..c8a7a36 100644
--- a/drivers/infiniband/hw/Makefile
+++ b/drivers/infiniband/hw/Makefile
@@ -10,3 +10,4 @@  obj-$(CONFIG_INFINIBAND_OCRDMA)		+= ocrdma/
 obj-$(CONFIG_INFINIBAND_USNIC)		+= usnic/
 obj-$(CONFIG_INFINIBAND_HFI1)		+= hfi1/
 obj-$(CONFIG_INFINIBAND_HNS)		+= hns/
+obj-$(CONFIG_INFINIBAND_PVRDMA)		+= pvrdma/