summaryrefslogtreecommitdiffstats
path: root/include/linux/zlib.h
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
commit8505e729a2f6eb0803ff943a15f133dd10afff3a (patch)
tree792066ae629828d9ec93da21d70cae4e49baf332 /include/linux/zlib.h
parent0f7e7aee2f37119a32e6e8b63250922442528961 (diff)
downloadblackbird-op-linux-8505e729a2f6eb0803ff943a15f133dd10afff3a.tar.gz
blackbird-op-linux-8505e729a2f6eb0803ff943a15f133dd10afff3a.zip
PCI: Add pci_claim_bridge_resource() to clip window if necessary
Add pci_claim_bridge_resource() to claim a PCI-PCI bridge window. This is like regular pci_claim_resource(), except that if we fail to claim the window, we check to see if we can reduce the size of the window and try again. This is for scenarios like this: pci_bus 0000:00: root bus resource [mem 0xc0000000-0xffffffff] pci 0000:00:01.0: bridge window [mem 0xbdf00000-0xddefffff 64bit pref] pci 0000:01:00.0: reg 0x10: [mem 0xc0000000-0xcfffffff pref] The 00:01.0 window is illegal: it starts before the host bridge window, so we have to assume the [0xbdf00000-0xbfffffff] region is inaccessible. We can make it legal by clipping it to [mem 0xc0000000-0xddefffff 64bit pref]. Previously we discarded the 00:01.0 window and tried to reassign that part of the hierarchy from scratch. That is a problem because Linux doesn't always assign things optimally. For example, in this case, BIOS put the 01:00.0 device in a prefetchable window below 4GB, but after 5b28541552ef, Linux puts the prefetchable window above 4GB where the 32-bit 01:00.0 device can't use it. Clipping the 00:01.0 window is less intrusive than completely reassigning things and is sufficient to let us use most of the BIOS configuration. Of course, it's possible that devices below 00:01.0 will no longer fit. If that's the case, we'll have to reassign things. But that's a separate problem. [bhelgaas: changelog, split into separate patch] 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: stable@vger.kernel.org # v3.16+
Diffstat (limited to 'include/linux/zlib.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud