• Mike Habeck's avatar
    x86/PCI: Add option to not assign BAR's if not already assigned · 7bd1c365
    Mike Habeck authored
    The Linux kernel assigns BARs that a BIOS did not assign, most likely
    to handle broken BIOSes that didn't enumerate the devices correctly.
    On UV the BIOS purposely doesn't assign I/O BARs for certain devices/
    drivers we know don't use them (examples, LSI SAS, Qlogic FC, ...).
    We purposely don't assign these I/O BARs because I/O Space is a very
    limited resource.  There is only 64k of I/O Space, and in a PCIe
    topology that space gets divided up into 4k chucks (this is due to
    the fact that a pci-to-pci bridge's I/O decoder is aligned at 4k)...
    Thus a system can have at most 16 cards with I/O BARs: (64k / 4k = 16)
    
    SGI needs to scale to >16 devices with I/O BARs.  So by not assigning
    I/O BARs on devices we know don't use them, we can do that (iff the
    kernel doesn't go and assign these BARs that the BIOS purposely didn't
    assign).
    
    This patch will not assign a resource to a device BAR if that BAR was
    not assigned by the BIOS, and the kernel cmdline option 'pci=nobar'
    was specified.   This patch is closely modeled after the 'pci=norom'
    option that currently exists in the tree.
    Signed-off-by: default avatarMike Habeck <habeck@sgi.com>
    Signed-off-by: default avatarMike Travis <travis@sgi.com>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    7bd1c365
pci_x86.h 5.12 KB