All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Manivannan Sadhasivam" <mani@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Damien Le Moal" <dlemoal@kernel.org>,
	"Frank Li" <Frank.Li@nxp.com>, "Arnd Bergmann" <arnd@arndb.de>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: endpoint: pci-epf-test: select configfs
Date: Wed, 11 Feb 2026 10:05:11 +0100	[thread overview]
Message-ID: <aYxGR-x3lGt7H1dp@ryzen> (raw)
In-Reply-To: <20260211070812.4087119-1-arnd@kernel.org>

On Wed, Feb 11, 2026 at 08:07:40AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Like some of the other endpoint modules, this one now also
> uses configfs, but is missing an indication in Kconfig:
> 
> arm-linux-gnueabi-ld: drivers/pci/endpoint/functions/pci-epf-test.o: in function `pci_epf_test_add_cfs':
> pci-epf-test.c:(.text.pci_epf_test_add_cfs+0x2c): undefined reference to `config_group_init_type_name'
> 
> Select the symbol as needed.
> 
> Fixes: ffcc4850a161 ("PCI: endpoint: pci-epf-test: Allow overriding default BAR sizes")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/pci/endpoint/functions/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pci/endpoint/functions/Kconfig b/drivers/pci/endpoint/functions/Kconfig
> index 0c9cea0698d7..bb5a23994288 100644
> --- a/drivers/pci/endpoint/functions/Kconfig
> +++ b/drivers/pci/endpoint/functions/Kconfig
> @@ -6,6 +6,7 @@
>  config PCI_EPF_TEST
>  	tristate "PCI Endpoint Test driver"
>  	depends on PCI_ENDPOINT
> +	select CONFIGFS_FS
>  	select CRC32
>  	help
>  	   Enable this configuration option to enable the test driver
> -- 
> 2.39.5
> 

Patch is fine with me:
Reviewed-by: Niklas Cassel <cassel@kernel.org>


However, I remember that you Arnd was one of the main reasons why Kishon
decided to use configfs to configure a PCI endpoint controller and to
bind a PCI endpoint function driver with a PCI endpoint controller.

I don't know of any other way than configfs to bind a PCI endpoint function
driver with a PCI endpoint controller.

To me, it seems a bit silly to be able to build PCI_ENDPOINT without
configfs. What should a user do with a library that they cannot bind to
a PCI endpoint controller?

Why shouldn't we just do something like:

diff --git a/drivers/pci/endpoint/Kconfig b/drivers/pci/endpoint/Kconfig
index 8dad291be8b8..d6f898094509 100644
--- a/drivers/pci/endpoint/Kconfig
+++ b/drivers/pci/endpoint/Kconfig
@@ -8,6 +8,7 @@ menu "PCI Endpoint"
 config PCI_ENDPOINT
 	bool "PCI Endpoint Support"
 	depends on HAVE_PCI
+	select PCI_ENDPOINT_CONFIGFS
 	help
 	   Enable this configuration option to support configurable PCI
 	   endpoint. This should be enabled if the platform has a PCI
diff --git a/drivers/pci/endpoint/functions/Kconfig b/drivers/pci/endpoint/functions/Kconfig
index 0c9cea0698d7..d7a4bea7d7b8 100644
--- a/drivers/pci/endpoint/functions/Kconfig
+++ b/drivers/pci/endpoint/functions/Kconfig
@@ -16,7 +16,6 @@ config PCI_EPF_TEST
 config PCI_EPF_NTB
 	tristate "PCI Endpoint NTB driver"
 	depends on PCI_ENDPOINT
-	select CONFIGFS_FS
 	help
 	  Select this configuration option to enable the Non-Transparent
 	  Bridge (NTB) driver for PCI Endpoint. NTB driver implements NTB
@@ -30,7 +29,6 @@ config PCI_EPF_VNTB
 	tristate "PCI Endpoint Virtual NTB driver"
 	depends on PCI_ENDPOINT
 	depends on NTB
-	select CONFIGFS_FS
 	help
 	  Select this configuration option to enable the Non-Transparent
 	  Bridge (NTB) driver for PCIe Endpoint. NTB driver implements NTB

  parent reply	other threads:[~2026-02-11  9:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11  7:07 [PATCH] PCI: endpoint: pci-epf-test: select configfs Arnd Bergmann
2026-02-11  8:43 ` Damien Le Moal
2026-02-11  9:05 ` Niklas Cassel [this message]
2026-02-11  9:37   ` Arnd Bergmann
2026-02-12 23:39     ` Damien Le Moal
2026-02-13  9:35       ` Niklas Cassel
2026-02-18 18:00         ` Bjorn Helgaas
2026-02-19  9:02           ` Niklas Cassel
2026-02-19 13:04             ` Niklas Cassel
2026-02-19 16:13               ` Bjorn Helgaas
2026-02-19 19:14                 ` Niklas Cassel
2026-02-19 16:00             ` Bjorn Helgaas
2026-02-18 18:00 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYxGR-x3lGt7H1dp@ryzen \
    --to=cassel@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=dlemoal@kernel.org \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mani@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.