All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/27] Refactor PCI controller operations
@ 2015-03-25  5:35 Daniel Axtens
  2015-03-25  5:35 ` [PATCH 01/27] powerpc: move find_and_init_phbs() to pSeries specific code Daniel Axtens
                   ` (26 more replies)
  0 siblings, 27 replies; 38+ messages in thread
From: Daniel Axtens @ 2015-03-25  5:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Daniel Axtens

This patch set moves some PCI controller operations out of ppc_md and
into a new pci_controller_ops struct.

This is desirable for systems with more than one type of PCI
controller. In particular, it's intended that this new interface will
be used by the CXL (aka CAPI) driver.

The design tries to balance a desire to avoid having yet another
abstratction layer with a desire to make it easy for vendor kernels to
pull in as little or as much as they are comfortable with.

To this end, it's in 3 main parts:

 1) Set up the pci_controller_ops structure. For each function we add
 to the structure, set up a shim that calls the controller_ops
 function if it exists, or the ppc_md function otherwise. Modify
 callsites to use the shims.

 2) Move each affected platform over from using ppc_md to using the
 controller_ops structure.

 3) Take out the shims and the ppc_md entries. Modify the callsites to
 use the controller_ops calls.

MSI and some legacy functions have been deliberately deferred, and
will be to be tackled at a later point.

The set has been:

 - Build tested for PowerNV, pSeries, Power Mac, Maple, Cell, PaSemi
 and Corenet 64 (for fsl_pci). It builds at every point in the series.

 - Boot tested on pSeries and PowerNV.

The set depends on mpe's two recent cleanup patches to remove powernv
RTAS support [1] and drop celleb [2].

The full breakdown of the patches is as follows:
Patches  1 - 5: minor necessary cleanups
Patches  6 - 12: Introduce struct and shims
Patches 13 - 20: Platform specific migrations
Patches 21 - 26: Remove shims
Patch        27: Final cleanup

Daniel Axtens (27):
  powerpc: move find_and_init_phbs() to pSeries specific code
  powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c
  powerpc/swiotlb: give init call a less misleading name
  powerpc/fsl_pci: Don't change ppc_swiotlb_enable after
    swiotlb_subsys_init
  powerpc: pcibios_enable_device_hook: return bool rather than int
  powerpc: Create the pci_controller_ops struct.
  powerpc: ppc_md.pci_dma_dev_setup -> pci_controller_ops.dma_dev_setup
  powerpc: ppc_md.pci_dma_bus_setup -> pci_controller_ops.dma_bus_setup
  powerpc: ppc_md.pci_probe_mode -> pci_controller_ops.probe_mode
  powerpc: ppc_md.pcibios_enable_device_hook ->
    pci_controller_ops.enable_device_hook
  powerpc: ppc_md.pcibios_window_alignment ->
    pci_controller_ops.window_alignment
  powerpc: ppc_md.pcibios_reset_secondary_bus ->
    pci_controller_ops.reset_secondary_bus
  powerpc: dart_iommu: optionally populate controller_ops on init
  powerpc/powermac: Move controller ops from ppc_md to controller_ops
  powerpc/pseries: Move controller ops from ppc_md to controller_ops
  powerpc/powernv:  Move controller ops from ppc_md to controller_ops
  powerpc/pasemi: Move controller ops from ppc_md to controller_ops
  powerpc/maple: Move controller ops from ppc_md to controller_ops
  powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to
    controller_ops
  powerpc/cell: Move controller ops from ppc_md to controller_ops
  powerpc: Remove shim for pci_controller_ops.window_alignment
  powerpc: Remove shim for pci_controller_ops.reset_secondary_bus
  powerpc: Remove shim for pci_controller_ops.enable_device_hook
  powerpc: Remove shim for pci_controller_ops.probe_mode
  powerpc: Remove shim for pci_controller_ops.dma_dev_setup
  powerpc: Remove shim for pci_controller_ops.dma_bus_setup
  powerpc: dart_iommu: Remove check for controller_ops == NULL case

 arch/powerpc/include/asm/iommu.h            |  3 +-
 arch/powerpc/include/asm/machdep.h          | 14 --------
 arch/powerpc/include/asm/pci-bridge.h       | 19 +++++++++++
 arch/powerpc/include/asm/pci.h              |  2 +-
 arch/powerpc/include/asm/ppc-pci.h          |  3 --
 arch/powerpc/kernel/dma-swiotlb.c           | 11 +++---
 arch/powerpc/kernel/pci-common.c            | 34 +++++++++++-------
 arch/powerpc/kernel/pci-hotplug.c           |  7 ++--
 arch/powerpc/kernel/pci_of_scan.c           |  7 ++--
 arch/powerpc/kernel/rtas_pci.c              | 47 -------------------------
 arch/powerpc/platforms/cell/cell.h          | 24 +++++++++++++
 arch/powerpc/platforms/cell/iommu.c         |  7 ++--
 arch/powerpc/platforms/cell/setup.c         |  5 +++
 arch/powerpc/platforms/maple/maple.h        |  2 ++
 arch/powerpc/platforms/maple/pci.c          |  4 +++
 arch/powerpc/platforms/maple/setup.c        |  2 +-
 arch/powerpc/platforms/pasemi/iommu.c       |  6 ++--
 arch/powerpc/platforms/pasemi/pasemi.h      |  1 +
 arch/powerpc/platforms/pasemi/pci.c         |  5 +++
 arch/powerpc/platforms/powermac/pci.c       | 38 ++++++++++++++++++---
 arch/powerpc/platforms/powermac/pmac.h      |  3 +-
 arch/powerpc/platforms/powermac/setup.c     | 22 +-----------
 arch/powerpc/platforms/powernv/pci-ioda.c   | 15 ++++----
 arch/powerpc/platforms/powernv/pci-p5ioc2.c |  1 +
 arch/powerpc/platforms/powernv/pci.c        |  5 ++-
 arch/powerpc/platforms/powernv/powernv.h    |  2 ++
 arch/powerpc/platforms/pseries/iommu.c      |  9 ++---
 arch/powerpc/platforms/pseries/pseries.h    |  2 ++
 arch/powerpc/platforms/pseries/setup.c      | 53 ++++++++++++++++++++++++++++-
 arch/powerpc/sysdev/dart_iommu.c            | 10 +++---
 arch/powerpc/sysdev/fsl_pci.c               | 23 +++++++++++--
 31 files changed, 244 insertions(+), 142 deletions(-)
 create mode 100644 arch/powerpc/platforms/cell/cell.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2015-03-31  4:23 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25  5:35 [PATCH 00/27] Refactor PCI controller operations Daniel Axtens
2015-03-25  5:35 ` [PATCH 01/27] powerpc: move find_and_init_phbs() to pSeries specific code Daniel Axtens
2015-03-25  7:40   ` Stephen Rothwell
2015-03-25  5:35 ` [PATCH 02/27] powerpc/powermac: move pmac_pci_probe_mode from setup.c to pci.c Daniel Axtens
2015-03-30 12:32   ` Michael Ellerman
2015-03-30 21:46     ` Benjamin Herrenschmidt
2015-03-31  4:23       ` Michael Ellerman
2015-03-30 22:12     ` Daniel Axtens
2015-03-25  5:35 ` [PATCH 03/27] powerpc/swiotlb: give init call a less misleading name Daniel Axtens
2015-03-30 12:32   ` Michael Ellerman
2015-03-25  5:35 ` [PATCH 04/27] powerpc/fsl_pci: Don't change ppc_swiotlb_enable after swiotlb_subsys_init Daniel Axtens
2015-03-30 12:32   ` Michael Ellerman
2015-03-30 23:57     ` Daniel Axtens
2015-03-25  5:35 ` [PATCH 05/27] powerpc: pcibios_enable_device_hook: return bool rather than int Daniel Axtens
2015-03-25  5:35 ` [PATCH 06/27] powerpc: Create the pci_controller_ops struct Daniel Axtens
2015-03-30 12:32   ` Michael Ellerman
2015-03-25  5:35 ` [PATCH 07/27] powerpc: ppc_md.pci_dma_dev_setup -> pci_controller_ops.dma_dev_setup Daniel Axtens
2015-03-30 12:32   ` Michael Ellerman
2015-03-25  5:35 ` [PATCH 08/27] powerpc: ppc_md.pci_dma_bus_setup -> pci_controller_ops.dma_bus_setup Daniel Axtens
2015-03-25  5:35 ` [PATCH 09/27] powerpc: ppc_md.pci_probe_mode -> pci_controller_ops.probe_mode Daniel Axtens
2015-03-25  5:35 ` [PATCH 10/27] powerpc: ppc_md.pcibios_enable_device_hook -> pci_controller_ops.enable_device_hook Daniel Axtens
2015-03-25  5:35 ` [PATCH 11/27] powerpc: ppc_md.pcibios_window_alignment -> pci_controller_ops.window_alignment Daniel Axtens
2015-03-25  5:35 ` [PATCH 12/27] powerpc: ppc_md.pcibios_reset_secondary_bus -> pci_controller_ops.reset_secondary_bus Daniel Axtens
2015-03-25  5:35 ` [PATCH 13/27] powerpc: dart_iommu: optionally populate controller_ops on init Daniel Axtens
2015-03-25  5:35 ` [PATCH 14/27] powerpc/powermac: Move controller ops from ppc_md to controller_ops Daniel Axtens
2015-03-25  5:35 ` [PATCH 15/27] powerpc/pseries: " Daniel Axtens
2015-03-25  5:35 ` [PATCH 16/27] powerpc/powernv: " Daniel Axtens
2015-03-25  5:35 ` [PATCH 17/27] powerpc/pasemi: " Daniel Axtens
2015-03-25  5:35 ` [PATCH 18/27] powerpc/maple: " Daniel Axtens
2015-03-25  5:35 ` [PATCH 19/27] powerpc: fsl_pci, swiotlb: " Daniel Axtens
2015-03-25  5:35 ` [PATCH 20/27] powerpc/cell: " Daniel Axtens
2015-03-25  5:35 ` [PATCH 21/27] powerpc: Remove shim for pci_controller_ops.window_alignment Daniel Axtens
2015-03-25  5:35 ` [PATCH 22/27] powerpc: Remove shim for pci_controller_ops.reset_secondary_bus Daniel Axtens
2015-03-25  5:35 ` [PATCH 23/27] powerpc: Remove shim for pci_controller_ops.enable_device_hook Daniel Axtens
2015-03-25  5:35 ` [PATCH 24/27] powerpc: Remove shim for pci_controller_ops.probe_mode Daniel Axtens
2015-03-25  5:35 ` [PATCH 25/27] powerpc: Remove shim for pci_controller_ops.dma_dev_setup Daniel Axtens
2015-03-25  5:36 ` [PATCH 26/27] powerpc: Remove shim for pci_controller_ops.dma_bus_setup Daniel Axtens
2015-03-25  5:36 ` [PATCH 27/27] powerpc: dart_iommu: Remove check for controller_ops == NULL case Daniel Axtens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.