ACPI: Optimize acpi_get_pci_rootbridge_handle() to boot faster
Move acpi_get_pci_rootbridge_handle() from glue.c to pci_root.c and get the root bridge ACPI handles by searching the &acpi_pci_roots list instead of walking through the ACPI name space. This significantly reduces boot time on large I/O systems. Signed-off-by: Justin Chen <justin.chen@hp.com> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@@ -117,6 +117,19 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
|
||||
|
||||
EXPORT_SYMBOL(acpi_pci_unregister_driver);
|
||||
|
||||
acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus)
|
||||
{
|
||||
struct acpi_pci_root *tmp;
|
||||
|
||||
list_for_each_entry(tmp, &acpi_pci_roots, node) {
|
||||
if ((tmp->id.segment == (u16) seg) && (tmp->id.bus == (u16) bus))
|
||||
return tmp->device->handle;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(acpi_get_pci_rootbridge_handle);
|
||||
|
||||
static acpi_status
|
||||
get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
|
||||
{
|
||||
|
Reference in New Issue
Block a user