]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 28 Oct 2011 22:28:14 +0000 (16:28 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 13 Dec 2011 18:42:32 +0000 (10:42 -0800)
commite50412413573bafa9513efe66ea184687a0f709a
tree6219880cb15a22e2dd57b6d6ed20edb67a3ac457
parent6dba6c862d302791b820bc15894f0f03f6654b8e
x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()

x86 has two kinds of PCI root bus scanning:

(1) ACPI-based, using _CRS resources.  This used pci_create_bus(), not
    pci_scan_bus(), because ACPI hotplug needed to split the
    pci_bus_add_devices() into a separate host bridge .start() method.

    This patch parses the _CRS resources earlier, so we can build a list of
    resources and pass it to pci_create_root_bus().

    Note that as before, we parse the _CRS even if we aren't going to use
    it so we can print it for debugging purposes.

(2) All other, which used either default resources (ioport_resource and
    iomem_resource) or information read from the hardware via amd_bus.c or
    similar.  This used pci_scan_bus().

    This patch converts x86_pci_root_bus_res_quirks() (previously called
    from pcibios_fixup_bus()) to x86_pci_root_bus_resources(), which builds
    a list of resources before we call pci_scan_root_bus().

    We also use x86_pci_root_bus_resources() if we have ACPI but are
    ignoring _CRS.

CC: Yinghai Lu <yinghai.lu@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/x86/include/asm/topology.h
arch/x86/pci/acpi.c
arch/x86/pci/bus_numa.c
arch/x86/pci/common.c