On Wed, Jan 28, 2015 at 2:42 AM, Daniel J Blueman <daniel@xxxxxxxxxxxxx> wrote:
With systems with a large number of PCI devices, we're seeing lack of 32-bit
MMIO space, eg one quad-port NetXtreme-2 adapter takes 128MB of space .
An errata to the PCIe 2.1 spec provides guidance on limitations with 64-bit
non-prefetchable BARs (since bridges have only 32-bit non-prefetchable
ranges) stating that vendors can enable the prefetchable bit in BARs under
certain circumstances to allow 64-bit allocation .
The problem with that, is that vendors can't know apriori what hosts their
products will be in, so can't just advertise prefetchable 64-bit BARs. What
can be done, is system firmware can use the 64-bit prefetchable BAR in
bridges, and assign a 64-bit non-prefetchable device BAR into that area,
where it is safe to do so (following the guidance).
At present, linux denies such allocations  and disables the BARs. It
seems a practical solution to allow them if the firmware believes it is
This particular message ():
pci 0002:01:00.0: BAR 0: [mem size 0x00002000 64bit] conflicts with PCI Bus
0002:00 [mem 0x10020000000-0x10027ffffff pref]
is misleading at best and likely a symptom of a bug. We printed the
*size* of BAR 0, not an address, which means we haven't assigned space
for the BAR. That means it should not conflict with anything.
We already do revert to firmware assignments in some situations when
Linux can't figure out how to assign things itself. But apparently
not in *this* situation.
Without seeing the whole picture, it's hard for me to figure out
what's going on here. Could you open a bug report at
http://bugzilla.kernel.org (category drivers/PCI) and attach a
complete dmesg and "lspci -vv" output? Then we can look at what
firmware did and what Linux thought was wrong with it.