Commit 75d1e937 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Greg Kroah-Hartman

[PATCH] PCI: Don't touch BARs of host bridges

 BARs of host bridges often have special meaning and AFAIK are best left
to be setup by the firmware or system-specific startup code and kept
intact by the generic resource handler.  For example a couple of host
bridges used for MIPS processors interpret BARs as target-mode decoders
for accessing host memory by PCI masters (which is quite reasonable).
For them it's desirable to keep their decoded address range overlapping
with the host RAM for simplicity if nothing else (I can imagine running
out of address space with lots of memory and 32-bit PCI with no DAC
support in the participating devices).

 This is already the case with the i386 and ppc platform-specific PCI
resource allocators.  Please consider the following change for the generic
allocator.  Currently we have a pile of hacks implemented for host bridges
to be left untouched and I'd be pleased to remove them.

From: "Maciej W. Rozycki" <macro@mips.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 942146bd
...@@ -57,8 +57,13 @@ pbus_assign_resources_sorted(struct pci_bus *bus) ...@@ -57,8 +57,13 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
list_for_each_entry(dev, &bus->devices, bus_list) { list_for_each_entry(dev, &bus->devices, bus_list) {
u16 class = dev->class >> 8; u16 class = dev->class >> 8;
if (class == PCI_CLASS_DISPLAY_VGA /* Don't touch classless devices and host bridges. */
|| class == PCI_CLASS_NOT_DEFINED_VGA) if (class == PCI_CLASS_NOT_DEFINED ||
class == PCI_CLASS_BRIDGE_HOST)
continue;
if (class == PCI_CLASS_DISPLAY_VGA ||
class == PCI_CLASS_NOT_DEFINED_VGA)
bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA; bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
pdev_sort_resources(dev, &head); pdev_sort_resources(dev, &head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment