diff mbox

[v2] IB: Move PCI dependency from root KConfig to HW's KConfigs

Message ID 20170905144625.11768-1-yuval.shaia@oracle.com (mailing list archive)
State Superseded
Headers show

Commit Message

Yuval Shaia Sept. 5, 2017, 2:46 p.m. UTC
No reason to have dependency on PCI for the entire infiniband stack so
move it to KConfig of only the drivers that actually using PCI.

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
v0 -> v1:
	* As suggested by Thomas Bogendoerfer:
		* Remove unneeded header inclusion from ipoib
		* Remove PCI dependency from ipoib's Kconfig
v1 -> v2:
	* s/PCI || BROKEN/PCI
	* Fix also drivers/staging/lustre/lnet/Kconfig
---
 drivers/infiniband/Kconfig                | 1 -
 drivers/infiniband/hw/cxgb3/Kconfig       | 1 +
 drivers/infiniband/hw/cxgb4/Kconfig       | 1 +
 drivers/infiniband/hw/hfi1/Kconfig        | 1 +
 drivers/infiniband/hw/i40iw/Kconfig       | 1 +
 drivers/infiniband/hw/qedr/Kconfig        | 1 +
 drivers/infiniband/hw/qib/Kconfig         | 1 +
 drivers/infiniband/sw/rdmavt/Kconfig      | 1 +
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 -
 drivers/staging/lustre/lnet/Kconfig       | 2 +-
 10 files changed, 8 insertions(+), 3 deletions(-)

Comments

Leon Romanovsky Sept. 6, 2017, 4:06 a.m. UTC | #1
On Tue, Sep 05, 2017 at 05:46:25PM +0300, Yuval Shaia wrote:
> No reason to have dependency on PCI for the entire infiniband stack so
> move it to KConfig of only the drivers that actually using PCI.
>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> v0 -> v1:
> 	* As suggested by Thomas Bogendoerfer:
> 		* Remove unneeded header inclusion from ipoib
> 		* Remove PCI dependency from ipoib's Kconfig
> v1 -> v2:
> 	* s/PCI || BROKEN/PCI
> 	* Fix also drivers/staging/lustre/lnet/Kconfig
> ---
>  drivers/infiniband/Kconfig                | 1 -
>  drivers/infiniband/hw/cxgb3/Kconfig       | 1 +
>  drivers/infiniband/hw/cxgb4/Kconfig       | 1 +
>  drivers/infiniband/hw/hfi1/Kconfig        | 1 +
>  drivers/infiniband/hw/i40iw/Kconfig       | 1 +
>  drivers/infiniband/hw/qedr/Kconfig        | 1 +
>  drivers/infiniband/hw/qib/Kconfig         | 1 +
>  drivers/infiniband/sw/rdmavt/Kconfig      | 1 +
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 -
>  drivers/staging/lustre/lnet/Kconfig       | 2 +-
>  10 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
> index 234fe01904e7..568088a9298c 100644
> --- a/drivers/infiniband/Kconfig
> +++ b/drivers/infiniband/Kconfig
> @@ -1,6 +1,5 @@
>  menuconfig INFINIBAND
>  	tristate "InfiniBand support"
> -	depends on PCI || BROKEN
>  	depends on HAS_IOMEM
>  	depends on NET
>  	depends on INET
> diff --git a/drivers/infiniband/hw/cxgb3/Kconfig b/drivers/infiniband/hw/cxgb3/Kconfig
> index 2b6352b85485..97046365f1c7 100644
> --- a/drivers/infiniband/hw/cxgb3/Kconfig
> +++ b/drivers/infiniband/hw/cxgb3/Kconfig
> @@ -1,5 +1,6 @@
>  config INFINIBAND_CXGB3
>  	tristate "Chelsio RDMA Driver"
> +	depends on PCI
>  	depends on CHELSIO_T3 && INET

I didn't check all other drivers, but this particular is already dependent on PCI.

It depends on CHELSIO_T3, which depends on "PCI && INET". So instead of
adding new dependency here, it will be nice to remove INET.

Thanks

>  	select GENERIC_ALLOCATOR
>  	---help---
> diff --git a/drivers/infiniband/hw/cxgb4/Kconfig b/drivers/infiniband/hw/cxgb4/Kconfig
> index afe8b28e0878..b771575b38c2 100644
> --- a/drivers/infiniband/hw/cxgb4/Kconfig
> +++ b/drivers/infiniband/hw/cxgb4/Kconfig
> @@ -1,6 +1,7 @@
>  config INFINIBAND_CXGB4
>  	tristate "Chelsio T4/T5 RDMA Driver"
>  	depends on CHELSIO_T4 && INET && (IPV6 || IPV6=n)
> +	depends on PCI
>  	select CHELSIO_LIB
>  	select GENERIC_ALLOCATOR
>  	---help---
> diff --git a/drivers/infiniband/hw/hfi1/Kconfig b/drivers/infiniband/hw/hfi1/Kconfig
> index f6ea0881765a..4f8fbffae36f 100644
> --- a/drivers/infiniband/hw/hfi1/Kconfig
> +++ b/drivers/infiniband/hw/hfi1/Kconfig
> @@ -1,6 +1,7 @@
>  config INFINIBAND_HFI1
>  	tristate "Intel OPA Gen1 support"
>  	depends on X86_64 && INFINIBAND_RDMAVT && I2C
> +	depends on PCI
>  	select MMU_NOTIFIER
>  	select CRC32
>  	select I2C_ALGOBIT
> diff --git a/drivers/infiniband/hw/i40iw/Kconfig b/drivers/infiniband/hw/i40iw/Kconfig
> index 6e7d27a14061..f6d20ba88c03 100644
> --- a/drivers/infiniband/hw/i40iw/Kconfig
> +++ b/drivers/infiniband/hw/i40iw/Kconfig
> @@ -1,6 +1,7 @@
>  config INFINIBAND_I40IW
>  	tristate "Intel(R) Ethernet X722 iWARP Driver"
>  	depends on INET && I40E
> +	depends on PCI
>  	select GENERIC_ALLOCATOR
>  	---help---
>  	Intel(R) Ethernet X722 iWARP Driver
> diff --git a/drivers/infiniband/hw/qedr/Kconfig b/drivers/infiniband/hw/qedr/Kconfig
> index 6c9f3923e838..3feec8dddf41 100644
> --- a/drivers/infiniband/hw/qedr/Kconfig
> +++ b/drivers/infiniband/hw/qedr/Kconfig
> @@ -1,6 +1,7 @@
>  config INFINIBAND_QEDR
>  	tristate "QLogic RoCE driver"
>  	depends on 64BIT && QEDE
> +	depends on PCI
>  	select QED_LL2
>  	select QED_RDMA
>  	---help---
> diff --git a/drivers/infiniband/hw/qib/Kconfig b/drivers/infiniband/hw/qib/Kconfig
> index e0fdb9201423..cb06314a2ae2 100644
> --- a/drivers/infiniband/hw/qib/Kconfig
> +++ b/drivers/infiniband/hw/qib/Kconfig
> @@ -1,6 +1,7 @@
>  config INFINIBAND_QIB
>  	tristate "Intel PCIe HCA support"
>  	depends on 64BIT && INFINIBAND_RDMAVT
> +	depends on PCI
>  	---help---
>  	This is a low-level driver for Intel PCIe QLE InfiniBand host
>  	channel adapters.  This driver does not support the Intel
> diff --git a/drivers/infiniband/sw/rdmavt/Kconfig b/drivers/infiniband/sw/rdmavt/Kconfig
> index fdd001ce13d8..2b5513da7e83 100644
> --- a/drivers/infiniband/sw/rdmavt/Kconfig
> +++ b/drivers/infiniband/sw/rdmavt/Kconfig
> @@ -1,6 +1,7 @@
>  config INFINIBAND_RDMAVT
>  	tristate "RDMA verbs transport library"
>  	depends on 64BIT
> +	depends on PCI
>  	select DMA_VIRT_OPS
>  	---help---
>  	This is a common software verbs provider for RDMA networks.
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 6c77df34869d..3fc3b7b20297 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -51,7 +51,6 @@
>  #include <net/addrconf.h>
>  #include <linux/inetdevice.h>
>  #include <rdma/ib_cache.h>
> -#include <linux/pci.h>
>
>  #define DRV_VERSION "1.0.0"
>
> diff --git a/drivers/staging/lustre/lnet/Kconfig b/drivers/staging/lustre/lnet/Kconfig
> index 2b5930150cda..6bcb53d0c6f4 100644
> --- a/drivers/staging/lustre/lnet/Kconfig
> +++ b/drivers/staging/lustre/lnet/Kconfig
> @@ -34,7 +34,7 @@ config LNET_SELFTEST
>
>  config LNET_XPRT_IB
>  	tristate "LNET infiniband support"
> -	depends on LNET && INFINIBAND && INFINIBAND_ADDR_TRANS
> +	depends on LNET && PCI && INFINIBAND && INFINIBAND_ADDR_TRANS
>  	default LNET && INFINIBAND
>  	help
>  	  This option allows the LNET users to use infiniband as an
> --
> 2.13.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuval Shaia Sept. 6, 2017, 5:48 a.m. UTC | #2
On Wed, Sep 06, 2017 at 07:06:04AM +0300, Leon Romanovsky wrote:
> > diff --git a/drivers/infiniband/hw/cxgb3/Kconfig b/drivers/infiniband/hw/cxgb3/Kconfig
> > index 2b6352b85485..97046365f1c7 100644
> > --- a/drivers/infiniband/hw/cxgb3/Kconfig
> > +++ b/drivers/infiniband/hw/cxgb3/Kconfig
> > @@ -1,5 +1,6 @@
> >  config INFINIBAND_CXGB3
> >  	tristate "Chelsio RDMA Driver"
> > +	depends on PCI
> >  	depends on CHELSIO_T3 && INET
> 
> I didn't check all other drivers, but this particular is already dependent on PCI.
> 
> It depends on CHELSIO_T3, which depends on "PCI && INET". So instead of
> adding new dependency here, it will be nice to remove INET.

Thanks Leon.
I will post v3 with this fix along with two others but will fix the INET in
a separate patch since i want this one to handle only the PCI dependency.

> 
> Thanks
> 
> >  	select GENERIC_ALLOCATOR

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig
index 234fe01904e7..568088a9298c 100644
--- a/drivers/infiniband/Kconfig
+++ b/drivers/infiniband/Kconfig
@@ -1,6 +1,5 @@ 
 menuconfig INFINIBAND
 	tristate "InfiniBand support"
-	depends on PCI || BROKEN
 	depends on HAS_IOMEM
 	depends on NET
 	depends on INET
diff --git a/drivers/infiniband/hw/cxgb3/Kconfig b/drivers/infiniband/hw/cxgb3/Kconfig
index 2b6352b85485..97046365f1c7 100644
--- a/drivers/infiniband/hw/cxgb3/Kconfig
+++ b/drivers/infiniband/hw/cxgb3/Kconfig
@@ -1,5 +1,6 @@ 
 config INFINIBAND_CXGB3
 	tristate "Chelsio RDMA Driver"
+	depends on PCI
 	depends on CHELSIO_T3 && INET
 	select GENERIC_ALLOCATOR
 	---help---
diff --git a/drivers/infiniband/hw/cxgb4/Kconfig b/drivers/infiniband/hw/cxgb4/Kconfig
index afe8b28e0878..b771575b38c2 100644
--- a/drivers/infiniband/hw/cxgb4/Kconfig
+++ b/drivers/infiniband/hw/cxgb4/Kconfig
@@ -1,6 +1,7 @@ 
 config INFINIBAND_CXGB4
 	tristate "Chelsio T4/T5 RDMA Driver"
 	depends on CHELSIO_T4 && INET && (IPV6 || IPV6=n)
+	depends on PCI
 	select CHELSIO_LIB
 	select GENERIC_ALLOCATOR
 	---help---
diff --git a/drivers/infiniband/hw/hfi1/Kconfig b/drivers/infiniband/hw/hfi1/Kconfig
index f6ea0881765a..4f8fbffae36f 100644
--- a/drivers/infiniband/hw/hfi1/Kconfig
+++ b/drivers/infiniband/hw/hfi1/Kconfig
@@ -1,6 +1,7 @@ 
 config INFINIBAND_HFI1
 	tristate "Intel OPA Gen1 support"
 	depends on X86_64 && INFINIBAND_RDMAVT && I2C
+	depends on PCI
 	select MMU_NOTIFIER
 	select CRC32
 	select I2C_ALGOBIT
diff --git a/drivers/infiniband/hw/i40iw/Kconfig b/drivers/infiniband/hw/i40iw/Kconfig
index 6e7d27a14061..f6d20ba88c03 100644
--- a/drivers/infiniband/hw/i40iw/Kconfig
+++ b/drivers/infiniband/hw/i40iw/Kconfig
@@ -1,6 +1,7 @@ 
 config INFINIBAND_I40IW
 	tristate "Intel(R) Ethernet X722 iWARP Driver"
 	depends on INET && I40E
+	depends on PCI
 	select GENERIC_ALLOCATOR
 	---help---
 	Intel(R) Ethernet X722 iWARP Driver
diff --git a/drivers/infiniband/hw/qedr/Kconfig b/drivers/infiniband/hw/qedr/Kconfig
index 6c9f3923e838..3feec8dddf41 100644
--- a/drivers/infiniband/hw/qedr/Kconfig
+++ b/drivers/infiniband/hw/qedr/Kconfig
@@ -1,6 +1,7 @@ 
 config INFINIBAND_QEDR
 	tristate "QLogic RoCE driver"
 	depends on 64BIT && QEDE
+	depends on PCI
 	select QED_LL2
 	select QED_RDMA
 	---help---
diff --git a/drivers/infiniband/hw/qib/Kconfig b/drivers/infiniband/hw/qib/Kconfig
index e0fdb9201423..cb06314a2ae2 100644
--- a/drivers/infiniband/hw/qib/Kconfig
+++ b/drivers/infiniband/hw/qib/Kconfig
@@ -1,6 +1,7 @@ 
 config INFINIBAND_QIB
 	tristate "Intel PCIe HCA support"
 	depends on 64BIT && INFINIBAND_RDMAVT
+	depends on PCI
 	---help---
 	This is a low-level driver for Intel PCIe QLE InfiniBand host
 	channel adapters.  This driver does not support the Intel
diff --git a/drivers/infiniband/sw/rdmavt/Kconfig b/drivers/infiniband/sw/rdmavt/Kconfig
index fdd001ce13d8..2b5513da7e83 100644
--- a/drivers/infiniband/sw/rdmavt/Kconfig
+++ b/drivers/infiniband/sw/rdmavt/Kconfig
@@ -1,6 +1,7 @@ 
 config INFINIBAND_RDMAVT
 	tristate "RDMA verbs transport library"
 	depends on 64BIT
+	depends on PCI
 	select DMA_VIRT_OPS
 	---help---
 	This is a common software verbs provider for RDMA networks.
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 6c77df34869d..3fc3b7b20297 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -51,7 +51,6 @@ 
 #include <net/addrconf.h>
 #include <linux/inetdevice.h>
 #include <rdma/ib_cache.h>
-#include <linux/pci.h>
 
 #define DRV_VERSION "1.0.0"
 
diff --git a/drivers/staging/lustre/lnet/Kconfig b/drivers/staging/lustre/lnet/Kconfig
index 2b5930150cda..6bcb53d0c6f4 100644
--- a/drivers/staging/lustre/lnet/Kconfig
+++ b/drivers/staging/lustre/lnet/Kconfig
@@ -34,7 +34,7 @@  config LNET_SELFTEST
 
 config LNET_XPRT_IB
 	tristate "LNET infiniband support"
-	depends on LNET && INFINIBAND && INFINIBAND_ADDR_TRANS
+	depends on LNET && PCI && INFINIBAND && INFINIBAND_ADDR_TRANS
 	default LNET && INFINIBAND
 	help
 	  This option allows the LNET users to use infiniband as an