[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <084b804f-2999-4f8d-8372-43cfbf0c0d28@app.fastmail.com>
Date: Thu, 13 Nov 2025 11:13:01 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Siddharth Vadapalli" <s-vadapalli@...com>,
"Lorenzo Pieralisi" <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kwilczynski@...nel.org>,
"Manivannan Sadhasivam" <mani@...nel.org>, "Rob Herring" <robh@...nel.org>,
bhelgaas@...gle.com, "Chen Wang" <unicorn_wang@...look.com>,
"Kishon Vijay Abraham I" <kishon@...nel.org>
Cc: stable@...r.kernel.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
srk@...com
Subject: Re: [PATCH] PCI: cadence: Kconfig: change PCIE_CADENCE configs from tristate
to bool
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@...el.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@...r.kernel.org>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@...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
Powered by blists - more mailing lists