From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "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>,
stable@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, srk@ti.com,
s-vadapalli@ti.com
Subject: Re: [PATCH] PCI: cadence: Kconfig: change PCIE_CADENCE configs from tristate to bool
Date: Mon, 17 Nov 2025 11:35:39 +0530 [thread overview]
Message-ID: <7eaa4d917f7639913838abd4fd64ae8fe73a8cfc.camel@ti.com> (raw)
In-Reply-To: <201b9ad1-3ebd-4992-acdd-925d2e357d22@app.fastmail.com>
On Fri, 2025-11-14 at 08:03 +0100, Arnd Bergmann wrote:
> On Fri, Nov 14, 2025, at 06:47, Siddharth Vadapalli wrote:
> > On Thu, 2025-11-13 at 11:13 +0100, Arnd Bergmann wrote:
> > > On Thu, Nov 13, 2025, at 10:27, Siddharth Vadapalli wrote:
>
> > Thank you for the suggestion. I think that the following Makefile changes
> > will be sufficient and Kconfig doesn't need to be modified:
> >
> > diff --git a/drivers/pci/controller/cadence/Makefile
> > b/drivers/pci/controller/cadence/Makefile
> > index 5e23f8539ecc..1a97c9b249b8 100644
> > --- a/drivers/pci/controller/cadence/Makefile
> > +++ b/drivers/pci/controller/cadence/Makefile
> > @@ -4,4 +4,6 @@ obj-$(CONFIG_PCIE_CADENCE_HOST) += pcie-cadence-host.o
> > obj-$(CONFIG_PCIE_CADENCE_EP) += pcie-cadence-ep.o
> > obj-$(CONFIG_PCIE_CADENCE_PLAT) += pcie-cadence-plat.o
> > obj-$(CONFIG_PCI_J721E) += pci-j721e.o
> > +pci_j721e-y := pci-j721e.o pcie-cadence.o
> > obj-$(CONFIG_PCIE_SG2042_HOST) += pcie-sg2042.o
> > +pci_sg2042_host-y := pci-sg2042.o pcie-cadence.o
> >
> > If either of PCI_J721E or SG2042_HOST is selected as a built-in module,
> > then pcie-cadence-host.c, pcie-cadence-ep.c and pcie-cadence.c drivers will
> > be built-in. If both PCI_J721E and SG2042_HOST are selected as loadable
> > modules, only then the library drivers will be enabled as loadable modules.
> >
> > Please let me know what you think.
>
> I don't think that the version above does what you want,
> this would build the pcie-cadence.o file into three separate
> modules and break in additional ways if a subset of them are
> built-in.
>
> I would still suggest combining pcie-cadence{,-ep,-host}.o into
> one module that is used by the other drivers, as that would address
> the build failure you are observing.
>
> An alternative would be to change the pcie-j721e.c file to only
> reference the host portion if host support is enabled for this
> driver.
While 'pcie-cadence.h' handles the case where 'PCIE_CADENCE_HOST' is not
defined:
#if IS_ENABLED(CONFIG_PCIE_CADENCE_HOST)
...
void cdns_pcie_host_disable(struct cdns_pcie_rc *rc);
...
#else
...
static inline void cdns_pcie_host_disable(struct cdns_pcie_rc *rc)
{
}
...
#endif
the issue occurs because PCIE_SG2042_HOST enables CONFIG_PCIE_CADENCE_HOST
but it is enabled as 'm'. As a result, the definition exists in pcie-
cadence-host.c that is built as a loadable module which is not accessible
by pci-j721e.c that is built-in.
I understand that the solution should be fixing the pci-j721e.c driver
rather than updating Kconfig or Makefile. Thank you for the feedback. I
will update the pci-j721e.c driver to handle the case that is triggering
the build error.
Regards,
Siddharth.
next prev parent reply other threads:[~2025-11-17 6:05 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
2025-11-14 5:47 ` Siddharth Vadapalli
2025-11-14 7:03 ` Arnd Bergmann
2025-11-17 6:05 ` Siddharth Vadapalli [this message]
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=7eaa4d917f7639913838abd4fd64ae8fe73a8cfc.camel@ti.com \
--to=s-vadapalli@ti.com \
--cc=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=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