]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / PM: Run wakeup notify handlers synchronously
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 12 Jun 2017 20:48:41 +0000 (22:48 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 14 Jun 2017 22:55:42 +0000 (00:55 +0200)
commitb5dc64f6cb7fda7b31e771f979b3f5505f809cae
tree8b0527537fdc5cadd399266cdd3741188a6212d4
parentd3add402c89192df5bac6bd430c3865ad409843b
ACPI / PM: Run wakeup notify handlers synchronously

The work functions provided by the users of acpi_add_pm_notifier()
should be run synchronously before re-enabling the wakeup GPE in
case they are used to clear the status and/or disable the wakeup
signaling at the source.  Otherwise, which is the case currently in
the PCI bus type code, the same wakeup event may be signaled for
multiple times while the execution of the work function in response
to it has already been queued up.

Fortunately, acpi_add_pm_notifier() is only used by PCI and by
ACPI device PM code internally, so the change is relatively
straightforward to make.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/acpi/device_pm.c
drivers/pci/pci-acpi.c
include/acpi/acpi_bus.h