Re: [PATCH -next] PCI: endpoint: fix build error, EP NTB driver uses configfs
Hi Lorenzo, On 04/02/21 10:39 pm, Lorenzo Pieralisi wrote: > On Thu, Feb 04, 2021 at 07:15:39PM +0530, Kishon Vijay Abraham I wrote: >> Hi Lorenzo, >> >> On 04/02/21 3:28 pm, Lorenzo Pieralisi wrote: >>> On Tue, Feb 02, 2021 at 12:12:55PM -0800, Randy Dunlap wrote: The pci-epf-ntb driver uses configfs APIs, so it should depend on CONFIGFS_FS to prevent build errors. ld: drivers/pci/endpoint/functions/pci-epf-ntb.o: in function `epf_ntb_add_cfs': pci-epf-ntb.c:(.text+0x1b): undefined reference to `config_group_init_type_name' Fixes: 7dc64244f9e9 ("PCI: endpoint: Add EP function driver to provide NTB functionality") Signed-off-by: Randy Dunlap Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: linux-...@vger.kernel.org --- You may switch to 'select CONFIG_FS_FS' if you feel strongly about it. >>> >>> Kishon ? >> >> There seems to be some issue in the version that got merged. The v11 >> patch series had this fixed [1] by using select CONFIGFS_FS. However >> whatever was merged seems to be v10 which didn't have select CONFIGFS_FS >> [2]. I had sent a private mail to you pointing the same (attached for >> reference, not sure if it was delivered). > > I think that Bjorn has not pulled my pci/ntb branch yet (so the one > in -next is v10 indeed, my one should be v11, please check). Right, pci/ntb branch in your repo looks correct. Thanks Kishon > > Thanks, > Lorenzo > >> Thanks >> Kishon >> >> [1] -> >> https://lore.kernel.org/linux-doc/20210201195809.7342-14-kis...@ti.com/ >> >> [2] -> >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pci/endpoint/functions/Kconfig >>> >>> Thanks, >>> Lorenzo >>> drivers/pci/endpoint/functions/Kconfig |1 + 1 file changed, 1 insertion(+) --- linux-next-20210202.orig/drivers/pci/endpoint/functions/Kconfig +++ linux-next-20210202/drivers/pci/endpoint/functions/Kconfig @@ -16,6 +16,7 @@ config PCI_EPF_TEST config PCI_EPF_NTB tristate "PCI Endpoint NTB driver" depends on PCI_ENDPOINT + depends on CONFIGFS_FS help Select this configuration option to enable the NTB driver for PCI Endpoint. NTB driver implements NTB controller > >> Date: Tue, 2 Feb 2021 21:57:37 +0530 >> From: Kishon Vijay Abraham I >> To: Lorenzo Pieralisi >> Subject: Re: [PATCH v11 13/17] PCI: endpoint: Add EP function driver to >> provide NTB functionality >> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 >> Thunderbird/68.10.0 >> >> Hi Lorenzo, >> >> On 02/02/21 1:28 am, Kishon Vijay Abraham I wrote: >>> Add a new endpoint function driver to provide NTB functionality >>> using multiple PCIe endpoint instances. >>> >>> Signed-off-by: Kishon Vijay Abraham I >>> [a...@arndb.de: Select configfs dependency] >>> Signed-off-by: Arnd Bergmann >>> [yebi...@huawei.com: Fix unused but set variables] >>> Signed-off-by: Ye Bin >>> [geert+rene...@glider.be: Explain NTB in PCI_EPF_NTB help text] >>> Signed-off-by: Geert Uytterhoeven >>> --- >>> drivers/pci/endpoint/functions/Kconfig | 13 + >>> drivers/pci/endpoint/functions/Makefile |1 + >>> drivers/pci/endpoint/functions/pci-epf-ntb.c | 2128 ++ >>> 3 files changed, 2142 insertions(+) >>> create mode 100644 drivers/pci/endpoint/functions/pci-epf-ntb.c >>> >>> diff --git a/drivers/pci/endpoint/functions/Kconfig >>> b/drivers/pci/endpoint/functions/Kconfig >>> index 8820d0f7ec77..5f1242ca2f4e 100644 >>> --- a/drivers/pci/endpoint/functions/Kconfig >>> +++ b/drivers/pci/endpoint/functions/Kconfig >>> @@ -12,3 +12,16 @@ config PCI_EPF_TEST >>>for PCI Endpoint. >>> >>>If in doubt, say "N" to disable Endpoint test driver. >>> + >>> +config PCI_EPF_NTB >>> + tristate "PCI Endpoint NTB driver" >>> + depends on PCI_ENDPOINT >>> + select CONFIGFS_FS >> >> I'm seeing some difference between here and linux-next. >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pci/endpoint/functions/Kconfig >> >> I see "select CONFIGFS_FS" missing in linux-next. >> >> Thank You, >> Kishon >> >>> + help >>> + Select this configuration option to enable the Non-Transparent >>> + Bridge (NTB) driver for PCI Endpoint. NTB driver implements NTB >>> + controller functionality using multiple PCIe endpoint instances. >>> + It can support NTB endpoint function devices created using >>> + device tree. >>> + >>> + If in doubt, say "N" to disable Endpoint NTB driver. >>> diff --git a/drivers/pci/endpoint/functions/Makefile >>> b/drivers/pci/endpoint/functions/Makefile >>> index d6fafff080e2..96ab932a537a 100644 >>> --- a/drivers/pci/endpoint/functions/Makefile >>> +++ b/drivers/pci/endpoint/functions/Makefile >>> @@ -4,3 +4,4 @@ >>> # >>> >>> obj-$(CONFIG_PCI_EPF_TEST) += pci-epf-test.o >>> +obj-$(CONFIG_PCI_EPF_NTB) +=
Re: [PATCH -next] PCI: endpoint: fix build error, EP NTB driver uses configfs
On Thu, Feb 04, 2021 at 07:15:39PM +0530, Kishon Vijay Abraham I wrote: > Hi Lorenzo, > > On 04/02/21 3:28 pm, Lorenzo Pieralisi wrote: > > On Tue, Feb 02, 2021 at 12:12:55PM -0800, Randy Dunlap wrote: > >> The pci-epf-ntb driver uses configfs APIs, so it should depend on > >> CONFIGFS_FS to prevent build errors. > >> > >> ld: drivers/pci/endpoint/functions/pci-epf-ntb.o: in function > >> `epf_ntb_add_cfs': > >> pci-epf-ntb.c:(.text+0x1b): undefined reference to > >> `config_group_init_type_name' > >> > >> Fixes: 7dc64244f9e9 ("PCI: endpoint: Add EP function driver to provide NTB > >> functionality") > >> > >> Signed-off-by: Randy Dunlap > >> Cc: Kishon Vijay Abraham I > >> Cc: Lorenzo Pieralisi > >> Cc: linux-...@vger.kernel.org > >> --- > >> You may switch to 'select CONFIG_FS_FS' if you feel strongly about it. > > > > Kishon ? > > There seems to be some issue in the version that got merged. The v11 > patch series had this fixed [1] by using select CONFIGFS_FS. However > whatever was merged seems to be v10 which didn't have select CONFIGFS_FS > [2]. I had sent a private mail to you pointing the same (attached for > reference, not sure if it was delivered). I think that Bjorn has not pulled my pci/ntb branch yet (so the one in -next is v10 indeed, my one should be v11, please check). Thanks, Lorenzo > Thanks > Kishon > > [1] -> > https://lore.kernel.org/linux-doc/20210201195809.7342-14-kis...@ti.com/ > > [2] -> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pci/endpoint/functions/Kconfig > > > > Thanks, > > Lorenzo > > > >> drivers/pci/endpoint/functions/Kconfig |1 + > >> 1 file changed, 1 insertion(+) > >> > >> --- linux-next-20210202.orig/drivers/pci/endpoint/functions/Kconfig > >> +++ linux-next-20210202/drivers/pci/endpoint/functions/Kconfig > >> @@ -16,6 +16,7 @@ config PCI_EPF_TEST > >> config PCI_EPF_NTB > >>tristate "PCI Endpoint NTB driver" > >>depends on PCI_ENDPOINT > >> + depends on CONFIGFS_FS > >>help > >> Select this configuration option to enable the NTB driver > >> for PCI Endpoint. NTB driver implements NTB controller > Date: Tue, 2 Feb 2021 21:57:37 +0530 > From: Kishon Vijay Abraham I > To: Lorenzo Pieralisi > Subject: Re: [PATCH v11 13/17] PCI: endpoint: Add EP function driver to > provide NTB functionality > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 > Thunderbird/68.10.0 > > Hi Lorenzo, > > On 02/02/21 1:28 am, Kishon Vijay Abraham I wrote: > > Add a new endpoint function driver to provide NTB functionality > > using multiple PCIe endpoint instances. > > > > Signed-off-by: Kishon Vijay Abraham I > > [a...@arndb.de: Select configfs dependency] > > Signed-off-by: Arnd Bergmann > > [yebi...@huawei.com: Fix unused but set variables] > > Signed-off-by: Ye Bin > > [geert+rene...@glider.be: Explain NTB in PCI_EPF_NTB help text] > > Signed-off-by: Geert Uytterhoeven > > --- > > drivers/pci/endpoint/functions/Kconfig | 13 + > > drivers/pci/endpoint/functions/Makefile |1 + > > drivers/pci/endpoint/functions/pci-epf-ntb.c | 2128 ++ > > 3 files changed, 2142 insertions(+) > > create mode 100644 drivers/pci/endpoint/functions/pci-epf-ntb.c > > > > diff --git a/drivers/pci/endpoint/functions/Kconfig > > b/drivers/pci/endpoint/functions/Kconfig > > index 8820d0f7ec77..5f1242ca2f4e 100644 > > --- a/drivers/pci/endpoint/functions/Kconfig > > +++ b/drivers/pci/endpoint/functions/Kconfig > > @@ -12,3 +12,16 @@ config PCI_EPF_TEST > >for PCI Endpoint. > > > >If in doubt, say "N" to disable Endpoint test driver. > > + > > +config PCI_EPF_NTB > > + tristate "PCI Endpoint NTB driver" > > + depends on PCI_ENDPOINT > > + select CONFIGFS_FS > > I'm seeing some difference between here and linux-next. > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pci/endpoint/functions/Kconfig > > I see "select CONFIGFS_FS" missing in linux-next. > > Thank You, > Kishon > > > + help > > + Select this configuration option to enable the Non-Transparent > > + Bridge (NTB) driver for PCI Endpoint. NTB driver implements NTB > > + controller functionality using multiple PCIe endpoint instances. > > + It can support NTB endpoint function devices created using > > + device tree. > > + > > + If in doubt, say "N" to disable Endpoint NTB driver. > > diff --git a/drivers/pci/endpoint/functions/Makefile > > b/drivers/pci/endpoint/functions/Makefile > > index d6fafff080e2..96ab932a537a 100644 > > --- a/drivers/pci/endpoint/functions/Makefile > > +++ b/drivers/pci/endpoint/functions/Makefile > > @@ -4,3 +4,4 @@ > > # > > > > obj-$(CONFIG_PCI_EPF_TEST) += pci-epf-test.o > > +obj-$(CONFIG_PCI_EPF_NTB) += pci-epf-ntb.o > > diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c > > b/drivers/pci/endpoint/functions/pci-epf-ntb.c > > new file mode 100644 > > index
Re: [PATCH -next] PCI: endpoint: fix build error, EP NTB driver uses configfs
Hi Lorenzo, On 04/02/21 3:28 pm, Lorenzo Pieralisi wrote: > On Tue, Feb 02, 2021 at 12:12:55PM -0800, Randy Dunlap wrote: >> The pci-epf-ntb driver uses configfs APIs, so it should depend on >> CONFIGFS_FS to prevent build errors. >> >> ld: drivers/pci/endpoint/functions/pci-epf-ntb.o: in function >> `epf_ntb_add_cfs': >> pci-epf-ntb.c:(.text+0x1b): undefined reference to >> `config_group_init_type_name' >> >> Fixes: 7dc64244f9e9 ("PCI: endpoint: Add EP function driver to provide NTB >> functionality") >> >> Signed-off-by: Randy Dunlap >> Cc: Kishon Vijay Abraham I >> Cc: Lorenzo Pieralisi >> Cc: linux-...@vger.kernel.org >> --- >> You may switch to 'select CONFIG_FS_FS' if you feel strongly about it. > > Kishon ? There seems to be some issue in the version that got merged. The v11 patch series had this fixed [1] by using select CONFIGFS_FS. However whatever was merged seems to be v10 which didn't have select CONFIGFS_FS [2]. I had sent a private mail to you pointing the same (attached for reference, not sure if it was delivered). Thanks Kishon [1] -> https://lore.kernel.org/linux-doc/20210201195809.7342-14-kis...@ti.com/ [2] -> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pci/endpoint/functions/Kconfig > > Thanks, > Lorenzo > >> drivers/pci/endpoint/functions/Kconfig |1 + >> 1 file changed, 1 insertion(+) >> >> --- linux-next-20210202.orig/drivers/pci/endpoint/functions/Kconfig >> +++ linux-next-20210202/drivers/pci/endpoint/functions/Kconfig >> @@ -16,6 +16,7 @@ config PCI_EPF_TEST >> config PCI_EPF_NTB >> tristate "PCI Endpoint NTB driver" >> depends on PCI_ENDPOINT >> +depends on CONFIGFS_FS >> help >>Select this configuration option to enable the NTB driver >>for PCI Endpoint. NTB driver implements NTB controller --- Begin Message --- Hi Lorenzo, On 02/02/21 1:28 am, Kishon Vijay Abraham I wrote: > Add a new endpoint function driver to provide NTB functionality > using multiple PCIe endpoint instances. > > Signed-off-by: Kishon Vijay Abraham I > [a...@arndb.de: Select configfs dependency] > Signed-off-by: Arnd Bergmann > [yebi...@huawei.com: Fix unused but set variables] > Signed-off-by: Ye Bin > [geert+rene...@glider.be: Explain NTB in PCI_EPF_NTB help text] > Signed-off-by: Geert Uytterhoeven > --- > drivers/pci/endpoint/functions/Kconfig | 13 + > drivers/pci/endpoint/functions/Makefile |1 + > drivers/pci/endpoint/functions/pci-epf-ntb.c | 2128 ++ > 3 files changed, 2142 insertions(+) > create mode 100644 drivers/pci/endpoint/functions/pci-epf-ntb.c > > diff --git a/drivers/pci/endpoint/functions/Kconfig > b/drivers/pci/endpoint/functions/Kconfig > index 8820d0f7ec77..5f1242ca2f4e 100644 > --- a/drivers/pci/endpoint/functions/Kconfig > +++ b/drivers/pci/endpoint/functions/Kconfig > @@ -12,3 +12,16 @@ config PCI_EPF_TEST > for PCI Endpoint. > > If in doubt, say "N" to disable Endpoint test driver. > + > +config PCI_EPF_NTB > + tristate "PCI Endpoint NTB driver" > + depends on PCI_ENDPOINT > + select CONFIGFS_FS I'm seeing some difference between here and linux-next. https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/pci/endpoint/functions/Kconfig I see "select CONFIGFS_FS" missing in linux-next. Thank You, Kishon > + help > + Select this configuration option to enable the Non-Transparent > + Bridge (NTB) driver for PCI Endpoint. NTB driver implements NTB > + controller functionality using multiple PCIe endpoint instances. > + It can support NTB endpoint function devices created using > + device tree. > + > + If in doubt, say "N" to disable Endpoint NTB driver. > diff --git a/drivers/pci/endpoint/functions/Makefile > b/drivers/pci/endpoint/functions/Makefile > index d6fafff080e2..96ab932a537a 100644 > --- a/drivers/pci/endpoint/functions/Makefile > +++ b/drivers/pci/endpoint/functions/Makefile > @@ -4,3 +4,4 @@ > # > > obj-$(CONFIG_PCI_EPF_TEST) += pci-epf-test.o > +obj-$(CONFIG_PCI_EPF_NTB)+= pci-epf-ntb.o > diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c > b/drivers/pci/endpoint/functions/pci-epf-ntb.c > new file mode 100644 > index ..338148cf56f5 > --- /dev/null > +++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c > @@ -0,0 +1,2128 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/** > + * Endpoint Function Driver to implement Non-Transparent Bridge functionality > + * > + * Copyright (C) 2020 Texas Instruments > + * Author: Kishon Vijay Abraham I > + */ > + > +/* > + * The PCI NTB function driver configures the SoC with multiple PCIe Endpoint > + * (EP) controller instances (see diagram below) in such a way that > + * transactions from one EP controller are routed to the other EP controller. > + * Once PCI NTB function driver configures the SoC with multiple EP > instances, > + * HOST1 and HOST2 can
Re: [PATCH -next] PCI: endpoint: fix build error, EP NTB driver uses configfs
On Tue, Feb 02, 2021 at 12:12:55PM -0800, Randy Dunlap wrote: > The pci-epf-ntb driver uses configfs APIs, so it should depend on > CONFIGFS_FS to prevent build errors. > > ld: drivers/pci/endpoint/functions/pci-epf-ntb.o: in function > `epf_ntb_add_cfs': > pci-epf-ntb.c:(.text+0x1b): undefined reference to > `config_group_init_type_name' > > Fixes: 7dc64244f9e9 ("PCI: endpoint: Add EP function driver to provide NTB > functionality") > > Signed-off-by: Randy Dunlap > Cc: Kishon Vijay Abraham I > Cc: Lorenzo Pieralisi > Cc: linux-...@vger.kernel.org > --- > You may switch to 'select CONFIG_FS_FS' if you feel strongly about it. Kishon ? Thanks, Lorenzo > drivers/pci/endpoint/functions/Kconfig |1 + > 1 file changed, 1 insertion(+) > > --- linux-next-20210202.orig/drivers/pci/endpoint/functions/Kconfig > +++ linux-next-20210202/drivers/pci/endpoint/functions/Kconfig > @@ -16,6 +16,7 @@ config PCI_EPF_TEST > config PCI_EPF_NTB > tristate "PCI Endpoint NTB driver" > depends on PCI_ENDPOINT > + depends on CONFIGFS_FS > help > Select this configuration option to enable the NTB driver > for PCI Endpoint. NTB driver implements NTB controller
[PATCH -next] PCI: endpoint: fix build error, EP NTB driver uses configfs
The pci-epf-ntb driver uses configfs APIs, so it should depend on CONFIGFS_FS to prevent build errors. ld: drivers/pci/endpoint/functions/pci-epf-ntb.o: in function `epf_ntb_add_cfs': pci-epf-ntb.c:(.text+0x1b): undefined reference to `config_group_init_type_name' Fixes: 7dc64244f9e9 ("PCI: endpoint: Add EP function driver to provide NTB functionality") Signed-off-by: Randy Dunlap Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: linux-...@vger.kernel.org --- You may switch to 'select CONFIG_FS_FS' if you feel strongly about it. drivers/pci/endpoint/functions/Kconfig |1 + 1 file changed, 1 insertion(+) --- linux-next-20210202.orig/drivers/pci/endpoint/functions/Kconfig +++ linux-next-20210202/drivers/pci/endpoint/functions/Kconfig @@ -16,6 +16,7 @@ config PCI_EPF_TEST config PCI_EPF_NTB tristate "PCI Endpoint NTB driver" depends on PCI_ENDPOINT + depends on CONFIGFS_FS help Select this configuration option to enable the NTB driver for PCI Endpoint. NTB driver implements NTB controller