diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-21 00:21:39 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-21 00:21:39 +0100 |
commit | f3fd0c8a7fc1e4f3107a09a75e622781d3007b56 (patch) | |
tree | d63af1d6106032a1fdbc788ef9b7805f01a05a0a /kernel/workqueue_sched.h | |
parent | 8a66790b7850a6669129af078768a1d42076a0ef (diff) | |
download | blackbird-op-linux-f3fd0c8a7fc1e4f3107a09a75e622781d3007b56.tar.gz blackbird-op-linux-f3fd0c8a7fc1e4f3107a09a75e622781d3007b56.zip |
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 'kernel/workqueue_sched.h')
0 files changed, 0 insertions, 0 deletions