diff options
| author | 2012-11-21 00:21:39 +0100 | |
|---|---|---|
| committer | 2012-11-21 00:21:39 +0100 | |
| commit | f3fd0c8a7fc1e4f3107a09a75e622781d3007b56 (patch) | |
| tree | d63af1d6106032a1fdbc788ef9b7805f01a05a0a /tools/perf/scripts/python | |
| parent | ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks (diff) | |
ACPI: Allow ACPI handles of devices to be initialized in advance
Currently, the ACPI handles of devices are initialized from within
device_add(), by acpi_bind_one() called from acpi_platform_notify()
which first uses the .find_device() routine provided by the device's
bus type to find the matching device node in the ACPI namespace.
This is a source of some computational overhead and, moreover, the
correctness of the result depends on the implementation of
.find_device() which is known to fail occasionally for some bus types
(e.g. PCI). In some cases, however, the corresponding ACPI device
node is known already before calling device_add() for the given
struct device object and the whole .find_device() dance in
acpi_platform_notify() is then simply unnecessary.
For this reason, make it possible to initialize the ACPI handles of
devices before calling device_add() for them. Modify
acpi_platform_notify() to call acpi_bind_one() in advance to check
the device's existing ACPI handle and skip the .find_device()
search if that is successful. Change acpi_bind_one() accordingly.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
