mbox series

[0/3] PCI: Modularize host-generic

Message ID 20200409234923.21598-1-robh@kernel.org
Headers show
Series PCI: Modularize host-generic | expand

Message

Rob Herring (Arm) April 9, 2020, 11:49 p.m. UTC
This is part of a larger effort to modularize ARCH_VEXPRESS. In
particular, the Arm FVP platforms use the host-generic driver. This
conversion was straight-forward. I didn't convert the other ECAM drivers
using host-common to modules, but am happy to do so if there's a strong
desire to do so.

In the process, I noticed that 'const' was being dropped from the match
table .data pointer, so the first patch constifies struct pci_ecam_ops.
I started trying to constify pci_ops too, but that became a never ending
treewide rabbit hole. So I ended up with a cast when we assign pci_ops
from pci_ecam_ops.

Rob


Rob Herring (3):
  PCI: Constify struct pci_ecam_ops
  PCI: host-generic: Support building as modules
  PCI: host-generic: Eliminate pci_host_common_probe wrappers

 arch/arm64/kernel/pci.c                   |  4 ++--
 drivers/acpi/pci_mcfg.c                   |  8 +++----
 drivers/pci/controller/Kconfig            |  4 ++--
 drivers/pci/controller/dwc/pcie-al.c      |  2 +-
 drivers/pci/controller/dwc/pcie-hisi.c    | 19 +++++------------
 drivers/pci/controller/pci-host-common.c  | 18 ++++++++++++----
 drivers/pci/controller/pci-host-generic.c | 26 +++++++----------------
 drivers/pci/controller/pci-thunder-ecam.c | 14 ++++++------
 drivers/pci/controller/pci-thunder-pem.c  | 16 ++++++--------
 drivers/pci/controller/pci-xgene.c        |  4 ++--
 drivers/pci/controller/pcie-tango.c       |  9 +++++---
 drivers/pci/ecam.c                        | 10 ++++++---
 drivers/pci/setup-bus.c                   |  1 +
 include/linux/pci-acpi.h                  |  2 +-
 include/linux/pci-ecam.h                  | 25 +++++++++++-----------
 15 files changed, 78 insertions(+), 84 deletions(-)

--
2.20.1

Comments

Lorenzo Pieralisi May 1, 2020, 2:16 p.m. UTC | #1
On Thu, Apr 09, 2020 at 05:49:20PM -0600, Rob Herring wrote:
> This is part of a larger effort to modularize ARCH_VEXPRESS. In
> particular, the Arm FVP platforms use the host-generic driver. This
> conversion was straight-forward. I didn't convert the other ECAM drivers
> using host-common to modules, but am happy to do so if there's a strong
> desire to do so.
> 
> In the process, I noticed that 'const' was being dropped from the match
> table .data pointer, so the first patch constifies struct pci_ecam_ops.
> I started trying to constify pci_ops too, but that became a never ending
> treewide rabbit hole. So I ended up with a cast when we assign pci_ops
> from pci_ecam_ops.
> 
> Rob

Hi Bjorn,

if you don't have any objections I'd need your ACK to take this
series.

Thanks,
Lorenzo

> Rob Herring (3):
>   PCI: Constify struct pci_ecam_ops
>   PCI: host-generic: Support building as modules
>   PCI: host-generic: Eliminate pci_host_common_probe wrappers
> 
>  arch/arm64/kernel/pci.c                   |  4 ++--
>  drivers/acpi/pci_mcfg.c                   |  8 +++----
>  drivers/pci/controller/Kconfig            |  4 ++--
>  drivers/pci/controller/dwc/pcie-al.c      |  2 +-
>  drivers/pci/controller/dwc/pcie-hisi.c    | 19 +++++------------
>  drivers/pci/controller/pci-host-common.c  | 18 ++++++++++++----
>  drivers/pci/controller/pci-host-generic.c | 26 +++++++----------------
>  drivers/pci/controller/pci-thunder-ecam.c | 14 ++++++------
>  drivers/pci/controller/pci-thunder-pem.c  | 16 ++++++--------
>  drivers/pci/controller/pci-xgene.c        |  4 ++--
>  drivers/pci/controller/pcie-tango.c       |  9 +++++---
>  drivers/pci/ecam.c                        | 10 ++++++---
>  drivers/pci/setup-bus.c                   |  1 +
>  include/linux/pci-acpi.h                  |  2 +-
>  include/linux/pci-ecam.h                  | 25 +++++++++++-----------
>  15 files changed, 78 insertions(+), 84 deletions(-)
> 
> --
> 2.20.1
Bjorn Helgaas May 1, 2020, 2:46 p.m. UTC | #2
On Fri, May 01, 2020 at 03:16:26PM +0100, Lorenzo Pieralisi wrote:
> On Thu, Apr 09, 2020 at 05:49:20PM -0600, Rob Herring wrote:
> > This is part of a larger effort to modularize ARCH_VEXPRESS. In
> > particular, the Arm FVP platforms use the host-generic driver. This
> > conversion was straight-forward. I didn't convert the other ECAM drivers
> > using host-common to modules, but am happy to do so if there's a strong
> > desire to do so.
> > 
> > In the process, I noticed that 'const' was being dropped from the match
> > table .data pointer, so the first patch constifies struct pci_ecam_ops.
> > I started trying to constify pci_ops too, but that became a never ending
> > treewide rabbit hole. So I ended up with a cast when we assign pci_ops
> > from pci_ecam_ops.
> > 
> > Rob
> 
> Hi Bjorn,
> 
> if you don't have any objections I'd need your ACK to take this
> series.

Oh, sorry, I didn't notice:

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> > Rob Herring (3):
> >   PCI: Constify struct pci_ecam_ops
> >   PCI: host-generic: Support building as modules
> >   PCI: host-generic: Eliminate pci_host_common_probe wrappers
> > 
> >  arch/arm64/kernel/pci.c                   |  4 ++--
> >  drivers/acpi/pci_mcfg.c                   |  8 +++----
> >  drivers/pci/controller/Kconfig            |  4 ++--
> >  drivers/pci/controller/dwc/pcie-al.c      |  2 +-
> >  drivers/pci/controller/dwc/pcie-hisi.c    | 19 +++++------------
> >  drivers/pci/controller/pci-host-common.c  | 18 ++++++++++++----
> >  drivers/pci/controller/pci-host-generic.c | 26 +++++++----------------
> >  drivers/pci/controller/pci-thunder-ecam.c | 14 ++++++------
> >  drivers/pci/controller/pci-thunder-pem.c  | 16 ++++++--------
> >  drivers/pci/controller/pci-xgene.c        |  4 ++--
> >  drivers/pci/controller/pcie-tango.c       |  9 +++++---
> >  drivers/pci/ecam.c                        | 10 ++++++---
> >  drivers/pci/setup-bus.c                   |  1 +
> >  include/linux/pci-acpi.h                  |  2 +-
> >  include/linux/pci-ecam.h                  | 25 +++++++++++-----------
> >  15 files changed, 78 insertions(+), 84 deletions(-)
> > 
> > --
> > 2.20.1
Lorenzo Pieralisi May 1, 2020, 3:38 p.m. UTC | #3
On Thu, Apr 09, 2020 at 05:49:20PM -0600, Rob Herring wrote:
> This is part of a larger effort to modularize ARCH_VEXPRESS. In
> particular, the Arm FVP platforms use the host-generic driver. This
> conversion was straight-forward. I didn't convert the other ECAM drivers
> using host-common to modules, but am happy to do so if there's a strong
> desire to do so.
> 
> In the process, I noticed that 'const' was being dropped from the match
> table .data pointer, so the first patch constifies struct pci_ecam_ops.
> I started trying to constify pci_ops too, but that became a never ending
> treewide rabbit hole. So I ended up with a cast when we assign pci_ops
> from pci_ecam_ops.
> 
> Rob
> 
> 
> Rob Herring (3):
>   PCI: Constify struct pci_ecam_ops
>   PCI: host-generic: Support building as modules
>   PCI: host-generic: Eliminate pci_host_common_probe wrappers
> 
>  arch/arm64/kernel/pci.c                   |  4 ++--
>  drivers/acpi/pci_mcfg.c                   |  8 +++----
>  drivers/pci/controller/Kconfig            |  4 ++--
>  drivers/pci/controller/dwc/pcie-al.c      |  2 +-
>  drivers/pci/controller/dwc/pcie-hisi.c    | 19 +++++------------
>  drivers/pci/controller/pci-host-common.c  | 18 ++++++++++++----
>  drivers/pci/controller/pci-host-generic.c | 26 +++++++----------------
>  drivers/pci/controller/pci-thunder-ecam.c | 14 ++++++------
>  drivers/pci/controller/pci-thunder-pem.c  | 16 ++++++--------
>  drivers/pci/controller/pci-xgene.c        |  4 ++--
>  drivers/pci/controller/pcie-tango.c       |  9 +++++---
>  drivers/pci/ecam.c                        | 10 ++++++---
>  drivers/pci/setup-bus.c                   |  1 +
>  include/linux/pci-acpi.h                  |  2 +-
>  include/linux/pci-ecam.h                  | 25 +++++++++++-----------
>  15 files changed, 78 insertions(+), 84 deletions(-)

Applied to pci/host-generic for v5.8, thanks !

Lorenzo