All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/5] ACPI based PCI support for arm64
@ 2016-01-14  7:32 ` Jayachandran C
  0 siblings, 0 replies; 30+ messages in thread
From: Jayachandran C @ 2016-01-14  7:32 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, linux-acpi, Arnd Bergmann,
	linux-arm-kernel, Rafael J. Wysocki
  Cc: Jayachandran C, Lorenzo Pieralisi, Tomasz Nowicki, xen-devel

This patchset provides a generic ACPI based PCI host controller
implementation and uses it on arm64.

The first patch moves the common code to handle MCFG ACPI table from
arch/x86 to drivers/acpi/pci_mcfg.c. The last patch in the patchset
provides the generic implementation of an ACPI based PCI host
controller with a new file drivers/acpi/pci_host_acpi.c. The other
patches are to fix up arm64 and ACPI code to work with these two
patches.

The pci host controller implementation keeps a reference to
pci_mmcfg_region entry so that config space access is done with a
simple mapping and generic PCI config read/write. There is also an
implementation of raw_pci_read/raw_pci_write provided by walking the
pci_mmcfg_list

The patchset is against 4.4, but it can be applied to pci/next
with a very minor fixup.  This is tested with arm64 QEMU and OVMF
and on x86 with qemu.

More testing or comments are welcome. The idea is to provide a
simpler alternative for ACPI PCI support in arm64, any feedback
from PCI or ACPI maintainers would be appreciated on this front.

Thanks,
JC.

v5->v6:
 - fix arm64 with xen compile issue reported by kbuild bot

v4->v5:
 - Fix arm build issue reported by the kbuild bot
 - Use config_enabled instead of ifdef in pci_mcfg.c

v3->v4:
 - Handle suggestions from Arnd Bergmann <arnd@arndb.de>
    * move the implementation of host controller to drivers/acpi
      under config option CONFIG_ACPI_PCI_HOST_GENERIC
    * remove unnecessary arch hooks (this done as much as possible
      without affecting the scope of the patch, will need another
      separate patchset for the rest).
    * remove pcibios_assign_resources fs_initcall that was added
 - fixup domain_nr assignment code, and move ACPI companion set
   to PCI code.
 - Call map resource correctly in setup code
 - fix kbuild robot report
 - More testing

v2->v3:
 - Move maintenance of the pci_mmcfg_list to drivers/acpi/pci_mcfg.c
   without changing x86 logic
 - use the pci_mmcfg_list in ARM64 implementation
 - provide raw_pci_read/raw_pci_write

v1->v2:
 - use CONFIG_PCI_MMCONFIG on arm64, provide a weak implementation
   of pci_mmcfg_late_init for arm64.
 - The real implementation of pci_mmcfg_late_init is in pci-host-acpi.c
   and it will save the MCFG table entries to an array. Earlier this
   was done with an arch_init call
 - remove unneeded pci_bus_add_devices call and fix MCFG saving code
 - Added a patch to ACPI pci_root.c to handle arm64 PCI IO resources

Jayachandran C (5):
  APCI: MCFG: Move mmcfg_list management to drivers/acpi
  PCI: Handle ACPI companion and domain number
  ACPI: PCI: Support platforms that need pci_remap_iospace
  arm64: pci: Add ACPI support
  PCI: ACPI: Add a generic ACPI based host controller

 arch/arm64/Kconfig             |   3 +
 arch/arm64/kernel/pci.c        |  34 ++++-
 arch/x86/include/asm/pci_x86.h |  24 +---
 arch/x86/pci/mmconfig-shared.c | 269 +++++------------------------------
 arch/x86/pci/mmconfig_32.c     |   1 +
 arch/x86/pci/mmconfig_64.c     |   1 +
 arch/x86/pci/numachip.c        |   1 +
 drivers/acpi/Kconfig           |   8 ++
 drivers/acpi/Makefile          |   2 +
 drivers/acpi/pci_host_acpi.c   | 186 ++++++++++++++++++++++++
 drivers/acpi/pci_mcfg.c        | 312 +++++++++++++++++++++++++++++++++++++++++
 drivers/acpi/pci_root.c        |  62 +++++++-
 drivers/acpi/resource.c        |   2 +
 drivers/pci/pci.c              |  15 +-
 drivers/pci/probe.c            |   2 +
 drivers/xen/pci.c              |   5 +-
 include/linux/pci-acpi.h       |  59 ++++++++
 17 files changed, 717 insertions(+), 269 deletions(-)
 create mode 100644 drivers/acpi/pci_host_acpi.c
 create mode 100644 drivers/acpi/pci_mcfg.c

-- 
1.9.1


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

end of thread, other threads:[~2016-01-14 10:42 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14  7:32 [PATCH v6 0/5] ACPI based PCI support for arm64 Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32 ` [PATCH v6 1/5] APCI: MCFG: Move mmcfg_list management to drivers/acpi Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  8:48   ` Dennis Chen
2016-01-14  8:48     ` Dennis Chen
2016-01-14  8:48   ` Dennis Chen
2016-01-14 10:33   ` [Xen-devel] " David Vrabel
2016-01-14 10:33     ` David Vrabel
2016-01-14 10:33     ` David Vrabel
2016-01-14 10:33   ` David Vrabel
2016-01-14  7:32 ` [PATCH v6 2/5] PCI: Handle ACPI companion and domain number Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32 ` [PATCH v6 3/5] ACPI: PCI: Support platforms that need pci_remap_iospace Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32 ` [PATCH v6 4/5] arm64: pci: Add ACPI support Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32 ` [PATCH v6 5/5] PCI: ACPI: Add a generic ACPI based host controller Jayachandran C
2016-01-14  7:32 ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C
2016-01-14  7:32   ` Jayachandran C

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.