Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc/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: "James E.J. Bottomley" <jejb@parisc-linux.org>
CC: Helge Deller <deller@gmx.de>
CC: linux-parisc@vger.kernel.org

authored by

Yinghai Lu and committed by
Bjorn Helgaas
2e5e804a 4e348ba2

+2 -3
+2 -3
drivers/parisc/lba_pci.c
··· 694 694 int i; 695 695 /* PCI-PCI Bridge */ 696 696 pci_read_bridge_bases(bus); 697 - for (i = PCI_BRIDGE_RESOURCES; i < PCI_NUM_RESOURCES; i++) { 698 - pci_claim_resource(bus->self, i); 699 - } 697 + for (i = PCI_BRIDGE_RESOURCES; i < PCI_NUM_RESOURCES; i++) 698 + pci_claim_bridge_resource(bus->self, i); 700 699 } else { 701 700 /* Host-PCI Bridge */ 702 701 int err;