sparc/PCI: Clip bridge windows to fit in upstream windows
authorYinghai Lu <yinghai@kernel.org>
Thu, 15 Jan 2015 22:21:51 +0000 (16:21 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 16 Jan 2015 16:04:43 +0000 (10:04 -0600)
commitd63e2e1f3df904bf6bd150bdafb42ddbb3257ea8
tree728125b20a6123be5f395940ecf74846b7bc7b13
parent3ebfe46ac72c0bda0fee3d33dd4cfe88f43cefd9
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 <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>
Acked-by: David S. Miller <davem@davemloft.net>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Yijing Wang <wangyijing@huawei.com>
CC: Sam Ravnborg <sam@ravnborg.org>
CC: sparclinux@vger.kernel.org
arch/sparc/kernel/pci.c