PCI/ACPI: Support I/O resources when parsing host bridge resources
authorJayachandran C <jchandra@broadcom.com>
Fri, 10 Jun 2016 19:55:12 +0000 (21:55 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 10 Jun 2016 21:00:48 +0000 (16:00 -0500)
commit0a70abb3806295e039f9b2df5321cc3f7c87f4d6
tree1c5a8e24eb3319ae27252121fc772d56e9397ea4
parent4d3f13845957a87729a324cce8509fad8826ef52
PCI/ACPI: Support I/O resources when parsing host bridge resources

On platforms with memory-mapped I/O ports, such as ia64 and ARM64, we have
to map the memory region and coordinate it with the arch's I/O port
accessors.

For ia64, we do this in arch code because it supports both dense (1 byte
per I/O port) and sparse (1024 bytes per I/O port) memory mapping.  For
arm64, we only support dense mappings, which we can do in the generic code
with pci_register_io_range() and pci_remap_iospace().

Add acpi_pci_root_remap_iospace() to remap dense memory-mapped I/O port
space when adding a bridge, and call pci_unmap_iospace() to release the
space when removing the bridge.

[bhelgaas: changelog, move #ifdef inside acpi_pci_root_remap_iospace()]
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
[Tomasz: merged in Sinan's patch to unmap IO resources properly, updated changelog]
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/acpi/pci_root.c