[PATCH v5 0/4] PCI: Keystone: Enable loadable module support

Siddharth Vadapalli posted 4 patches 1 month, 2 weeks ago
drivers/pci/controller/dwc/Kconfig            | 15 +++-
drivers/pci/controller/dwc/Makefile           |  3 +
drivers/pci/controller/dwc/pci-keystone.c     | 80 +++++++++++--------
.../pci/controller/dwc/pcie-designware-ep.c   |  1 +
.../pci/controller/dwc/pcie-designware-host.c |  1 +
drivers/pci/host-bridge.c                     |  1 +
include/linux/pci.h                           |  1 +
7 files changed, 65 insertions(+), 37 deletions(-)
[PATCH v5 0/4] PCI: Keystone: Enable loadable module support
Posted by Siddharth Vadapalli 1 month, 2 weeks ago
Hello,

This series enables support for the 'pci-keystone.c' driver to be built
as a loadable module. The motivation for the series is that PCIe is not
a necessity for booting Linux due to which the 'pci-keystone.c' driver
does not need to be built-in.

Series is based on 6.18-rc1 tag of Mainline Linux.

This series has __NO__ dependencies.

v4:
https://lore.kernel.org/r/20251022095724.997218-1-s-vadapalli@ti.com/
Changes since v4:
- To fix the build error on ARM32 platforms as reported at:
  https://lore.kernel.org/r/202510281008.jw19XuyP-lkp@intel.com/
  patch 4 in the series has been updated by introducing a new config
  named "PCI_KEYSTONE_TRISTATE" which allows building the driver as
  a loadable module. Additionally, this newly introduced config can
  be enabled only for non-ARM32 platforms. As a result, ARM32 platforms
  continue using the existing PCI_KEYSTONE config which is a bool, while
  ARM64 platforms can use PCI_KEYSTONE_TRISTATE which is a tristate, and
  can optionally enabled loadable module support being enabled by this
  series.

Series has been compile tested with W=1 for ARM32 using
arm-none-linux-gnueabihf-gcc

Series has been tested for functionality on an ARM64 platform (AM65 SoC):
AM654-EVM with an NVMe SSD connected to the PCIe Connector of the EVM.
Test Logs:
https://gist.github.com/Siddharth-Vadapalli-at-TI/474a16037d990206e1d22399a93dfee7

Regards,
Siddharth.

Siddharth Vadapalli (4):
  PCI: Export pci_get_host_bridge_device() for use by pci-keystone
  PCI: dwc: Export dw_pcie_allocate_domains() and
    dw_pcie_ep_raise_msix_irq()
  PCI: keystone: Exit ks_pcie_probe() for invalid mode
  PCI: keystone: Add support to build as a loadable module

 drivers/pci/controller/dwc/Kconfig            | 15 +++-
 drivers/pci/controller/dwc/Makefile           |  3 +
 drivers/pci/controller/dwc/pci-keystone.c     | 80 +++++++++++--------
 .../pci/controller/dwc/pcie-designware-ep.c   |  1 +
 .../pci/controller/dwc/pcie-designware-host.c |  1 +
 drivers/pci/host-bridge.c                     |  1 +
 include/linux/pci.h                           |  1 +
 7 files changed, 65 insertions(+), 37 deletions(-)

-- 
2.51.0
Re: [PATCH v5 0/4] PCI: Keystone: Enable loadable module support
Posted by Manivannan Sadhasivam 1 month, 1 week ago
On Wed, 29 Oct 2025 13:34:48 +0530, Siddharth Vadapalli wrote:
> This series enables support for the 'pci-keystone.c' driver to be built
> as a loadable module. The motivation for the series is that PCIe is not
> a necessity for booting Linux due to which the 'pci-keystone.c' driver
> does not need to be built-in.
> 
> Series is based on 6.18-rc1 tag of Mainline Linux.
> 
> [...]

Applied, thanks!

[1/4] PCI: Export pci_get_host_bridge_device() for use by pci-keystone
      commit: 88254d46823be8563f8f81d78390a7313ae6fad7
[2/4] PCI: dwc: Export dw_pcie_allocate_domains() and dw_pcie_ep_raise_msix_irq()
      commit: 9acc60a5bca02351f852651c0123d9994663ec0a
[3/4] PCI: keystone: Exit ks_pcie_probe() for invalid mode
      commit: 7b5a5b7715c2dea2541e7fd3da15c2881fdfc553
[4/4] PCI: keystone: Add support to build as a loadable module
      commit: 041c2f0e34ba4823101bf307d6a6d41d98f5dac3

Best regards,
-- 
Manivannan Sadhasivam <mani@kernel.org>
Re: [PATCH v5 0/4] PCI: Keystone: Enable loadable module support
Posted by Bjorn Helgaas 1 month ago
On Thu, Nov 06, 2025 at 01:40:10PM +0530, Manivannan Sadhasivam wrote:
> 
> On Wed, 29 Oct 2025 13:34:48 +0530, Siddharth Vadapalli wrote:
> > This series enables support for the 'pci-keystone.c' driver to be built
> > as a loadable module. The motivation for the series is that PCIe is not
> > a necessity for booting Linux due to which the 'pci-keystone.c' driver
> > does not need to be built-in.
> > 
> > Series is based on 6.18-rc1 tag of Mainline Linux.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/4] PCI: Export pci_get_host_bridge_device() for use by pci-keystone
>       commit: 88254d46823be8563f8f81d78390a7313ae6fad7
> [2/4] PCI: dwc: Export dw_pcie_allocate_domains() and dw_pcie_ep_raise_msix_irq()
>       commit: 9acc60a5bca02351f852651c0123d9994663ec0a
> [3/4] PCI: keystone: Exit ks_pcie_probe() for invalid mode
>       commit: 7b5a5b7715c2dea2541e7fd3da15c2881fdfc553
> [4/4] PCI: keystone: Add support to build as a loadable module
>       commit: 041c2f0e34ba4823101bf307d6a6d41d98f5dac3

Just FYI, I moved these to pci/controller/keystone to separate them
from the j721e changes on pci/controller/ti.  It's a little easier for
me when each driver is on a separate topic branch.

I also reordered them so all the module-related changes are together
instead of having the invalid mode bug fix in the middle of them.