Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Siddharth Vadapalli" <s-vadapalli@ti.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	bhelgaas@google.com, "Chen Wang" <unicorn_wang@outlook.com>,
	"Kishon Vijay Abraham I" <kishon@kernel.org>
Cc: stable@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, srk@ti.com
Subject: Re: [PATCH] PCI: cadence: Kconfig: change PCIE_CADENCE configs from tristate to bool
Date: Thu, 13 Nov 2025 11:13:01 +0100	[thread overview]
Message-ID: <084b804f-2999-4f8d-8372-43cfbf0c0d28@app.fastmail.com> (raw)
In-Reply-To: <20251113092721.3757387-1-s-vadapalli@ti.com>

On Thu, Nov 13, 2025, at 10:27, Siddharth Vadapalli wrote:
> The drivers associated with the PCIE_CADENCE, PCIE_CADENCE_HOST AND
> PCIE_CADENCE_EP configs are used by multiple vendor drivers and serve as a
> library of helpers. Since the vendor drivers could individually be built
> as built-in or as loadable modules, it is possible to select a build
> configuration wherein a vendor driver is built-in while the library is
> built as a loadable module. This will result in a build error as reported
> in the 'Closes' link below.
>
> Address the build error by changing the library configs to be 'bool'
> instead of 'tristate'.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: 
> https://lore.kernel.org/oe-kbuild-all/202511111705.MZ7ls8Hm-lkp@intel.com/
> Fixes: 1c72774df028 ("PCI: sg2042: Add Sophgo SG2042 PCIe driver")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>

I really think there has to be a better solution here, this is not
an unusual problem.

> @@ -4,16 +4,16 @@ menu "Cadence-based PCIe controllers"
>  	depends on PCI
> 
>  config PCIE_CADENCE
> -	tristate
> +	bool
> 
>  config PCIE_CADENCE_HOST
> -	tristate
> +	bool
>  	depends on OF
>  	select IRQ_DOMAIN
>  	select PCIE_CADENCE
> 
>  config PCIE_CADENCE_EP
> -	tristate
> +	bool
>  	depends on OF
>  	depends on PCI_ENDPOINT
>  	select PCIE_CADENCE

I think the easiest way would be to leave PCIE_CADENCE as
a 'tristate' symbol but make the other two 'bool', and then
adjust the Makefile logic to use CONFIG_PCIE_CADENCE as
the thing that controls how the individual drivers are built.

That way, if any platform specific driver is built-in, both
the EP and HOST support are built-in or disabled but never
loadable modules. As long as all platform drivers are
loadable modules, so would be the base support.

     Arnd

  reply	other threads:[~2025-11-13 10:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  9:27 [PATCH] PCI: cadence: Kconfig: change PCIE_CADENCE configs from tristate to bool Siddharth Vadapalli
2025-11-13 10:13 ` Arnd Bergmann [this message]
2025-11-14  5:47   ` Siddharth Vadapalli
2025-11-14  7:03     ` Arnd Bergmann
2025-11-17  6:05       ` Siddharth Vadapalli
2025-11-17  9:06         ` Arnd Bergmann
2025-11-17  9:23           ` Siddharth Vadapalli
2025-11-17  9:28             ` Manivannan Sadhasivam
2025-11-17  9:42             ` Arnd Bergmann
2025-11-13 10:38 ` Hans Zhang
2025-11-13 10:43   ` Siddharth Vadapalli
2025-11-13 10:51     ` Hans Zhang

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=084b804f-2999-4f8d-8372-43cfbf0c0d28@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=s-vadapalli@ti.com \
    --cc=srk@ti.com \
    --cc=stable@vger.kernel.org \
    --cc=unicorn_wang@outlook.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox