summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2015-01-15 16:21:49 -0600
committerBjorn Helgaas <bhelgaas@google.com>2015-01-16 10:04:42 -0600
commitb3e118224c011b885ef8331bd5b341f15b3bd69a (patch)
tree081186ad1964806cff65f5ec5c7f91494e753f7d /arch
parent851b09369255a91e77f56d83e3643439ac5b209a (diff)
downloadlinux-b3e118224c011b885ef8331bd5b341f15b3bd69a.tar.gz
linux-b3e118224c011b885ef8331bd5b341f15b3bd69a.tar.bz2
linux-b3e118224c011b885ef8331bd5b341f15b3bd69a.zip
alpha/PCI: Clip bridge windows to fit in upstream windows
Every PCI-PCI bridge window should fit inside an upstream bridge window because orphaned address space is unreachable from the primary side of the upstream bridge. If we inherit invalid bridge windows that overlap an upstream window from firmware, clip them to fit and update the bridge accordingly. [bhelgaas: changelog] Link: https://bugzilla.kernel.org/show_bug.cgi?id=85491 Reported-by: Marek Kordik <kordikmarek@gmail.com> Fixes: 5b28541552ef ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources") Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Richard Henderson <rth@twiddle.net> CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru> CC: Matt Turner <mattst88@gmail.com> CC: linux-alpha@vger.kernel.org
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/pci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 076c35cd6cde..98a1525fa164 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -285,8 +285,12 @@ pcibios_claim_one_bus(struct pci_bus *b)
if (r->parent || !r->start || !r->flags)
continue;
if (pci_has_flag(PCI_PROBE_ONLY) ||
- (r->flags & IORESOURCE_PCI_FIXED))
- pci_claim_resource(dev, i);
+ (r->flags & IORESOURCE_PCI_FIXED)) {
+ if (pci_claim_resource(dev, i) == 0)
+ continue;
+
+ pci_claim_bridge_resource(dev, i);
+ }
}
}