Commit:     2f000f5c153e984d5c166e42a9d38113de8693b3
Parent:     616362de2fe224512fe105aec08f19f5470afb01
Author:     Chen, Justin <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 10 17:07:00 2006 -0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Fri Oct 27 02:31:16 2006 -0400

    ACPI: optimize pci_rootbridge search
    acpi_get_pci_rootbridge_handle() walks the ACPI name space
    searching for seg, bus and the PCI_ROOT_HID_STRING --
    returning the handle as soon as if find the match.
    But the current codes always parses through the whole namespace because
    the user_function find_pci_rootbridge() returns status=AE_OK when it finds 
the match.
    Make the find_pci_rootbridge() return AE_CTRL_TERMINATE when it finds the 
    This reduces the ACPI namespace walk for acpi_get_pci_rootbridge_handle().
    Signed-off-by: Justin Chen <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
 drivers/acpi/glue.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 10f160d..ba8fe83 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -189,8 +189,12 @@ find_pci_rootbridge(acpi_handle handle, u32 lvl, void 
*context, void **rv)
        bus = tmp;
        if (seg == find->seg && bus == find->bus)
+       {
                find->handle = handle;
-       status = AE_OK;
+               status = AE_CTRL_TERMINATE;
+       }
+       else
+               status = AE_OK;
        return status;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to