PCI: Allocate 64-bit BARs above 4G when possible
authorYinghai Lu <yinghai@kernel.org>
Fri, 20 Dec 2013 17:55:44 +0000 (10:55 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 7 Jan 2014 23:24:33 +0000 (16:24 -0700)
commitd56dbf5bab8ce44c5407bb099f71987f58d18bb4
treeeb75a24b8515218bea59898b6da37e1152cbbe0f
parentf75b99d5a77d63f20e07bd276d5a427808ac8ef6
PCI: Allocate 64-bit BARs above 4G when possible

Try to allocate space for 64-bit BARs above 4G first, to preserve the space
below 4G for 32-bit BARs.  If there's no space above 4G available, fall
back to allocating anywhere.

[bhelgaas: reworked starting from http://lkml.kernel.org/r/1387485843-17403-2-git-send-email-yinghai@kernel.org]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/bus.c