diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2016-06-08 11:04:48 (GMT) |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-23 16:48:59 (GMT) |
commit | dcce0f153b63412291db4c5c5f714404a6e4f7a1 (patch) | |
tree | 0612f036de81f4fac73129978a6c3ab04058a9d4 /drivers/pci/host/pci-host-common.c | |
parent | 765bf9b739731b925ca26a8f05765b87f2bd9724 (diff) | |
download | linux-dcce0f153b63412291db4c5c5f714404a6e4f7a1.tar.xz |
PCI: generic: Claim bus resources on PCI_PROBE_ONLY set-ups
We claim PCI BAR and bridge window resources in pci_bus_assign_resources(),
but when PCI_PROBE_ONLY is set, we treat those resources as immutable and
don't call pci_bus_assign_resources(), so the resources aren't put in the
resource tree.
When the resources aren't in the tree, they don't show up in /proc/iomem,
we can't detect conflicts, and we need special cases elsewhere for
PCI_PROBE_ONLY or resources without a parent pointer.
Claim all PCI BAR and window resources in the PCI_PROBE_ONLY case.
If a PCI_PROBE_ONLY platform assigns conflicting resources, Linux can't fix
the conflicts. Previously we didn't notice the conflicts, but now we will,
which may expose new failures.
[bhelgaas: changelog, summarize comment]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Will Deacon <will.deacon@arm.com>
CC: Arnd Bergmann <arnd@arndb.de>
CC: David Daney <david.daney@cavium.com>
Diffstat (limited to 'drivers/pci/host/pci-host-common.c')
-rw-r--r-- | drivers/pci/host/pci-host-common.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-host-common.c b/drivers/pci/host/pci-host-common.c index 8cba7ab..c95d45d 100644 --- a/drivers/pci/host/pci-host-common.c +++ b/drivers/pci/host/pci-host-common.c @@ -155,7 +155,14 @@ int pci_host_common_probe(struct platform_device *pdev, pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); - if (!pci_has_flag(PCI_PROBE_ONLY)) { + /* + * We insert PCI resources into the iomem_resource and + * ioport_resource trees in either pci_bus_claim_resources() + * or pci_bus_assign_resources(). + */ + if (pci_has_flag(PCI_PROBE_ONLY)) { + pci_bus_claim_resources(bus); + } else { pci_bus_size_bridges(bus); pci_bus_assign_resources(bus); |