Skip to content

Commit d63e2e1

Browse files
Yinghai Lubjorn-helgaas
authored andcommitted
sparc/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 <[email protected]> Fixes: 5b28541 ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources") Signed-off-by: Yinghai Lu <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: David S. Miller <[email protected]> CC: Paul Gortmaker <[email protected]> CC: Yijing Wang <[email protected]> CC: Sam Ravnborg <[email protected]> CC: [email protected]
1 parent 3ebfe46 commit d63e2e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/sparc/kernel/pci.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,10 @@ static void pci_claim_bus_resources(struct pci_bus *bus)
639639
(unsigned long long)r->end,
640640
(unsigned int)r->flags);
641641

642-
pci_claim_resource(dev, i);
642+
if (pci_claim_resource(dev, i) == 0)
643+
continue;
644+
645+
pci_claim_bridge_resource(dev, i);
643646
}
644647
}
645648

0 commit comments

Comments
 (0)