lkml.org 
[lkml]   [2013]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/3] ACPI / dock: Rework the handling of notifications
From
On Fri, Jun 28, 2013 at 3:53 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The ACPI dock driver uses register_acpi_bus_notifier() which
> installs a notifier triggered globally for all system notifications.
> That first of all is inefficient, because the dock driver is only
> interested in notifications associated with the devices it handles,
> but it has to handle all system notifies for all devices. Moreover,
> it does that even if no docking stations are present in the system
> (CONFIG_ACPI_DOCK set is sufficient for that to happen). Besides,
> that is inconvenient, because it requires the driver to do extra work
> for each notification to find the target dock station object.
>
> For these reasons, rework the dock driver to install a notify
> handler individually for each dock station in the system using
> acpi_install_notify_handler(). This allows the dock station
> object to be passed directly to the notify handler and makes it
> possible to simplify the dock driver quite a bit. It also
> reduces the overhead related to the handling of all system
> notifies when CONFIG_ACPI_DOCK is set.

original change to use register_acpi_bus_notifier, have two assumption
1. two dock_station will have same handle.
2. acpi subsystem: non root acpi device only can have one system
notifier installed.

Maybe you can rework acpi_install_notify_handler to fix 2.

Thanks

Yinghai


\
 
 \ /
  Last update: 2013-06-29 01:41    [W:0.129 / U:3.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site