Skip to content

Commit

Permalink
ACPICA: Clear all non-wakeup GPEs in acpi_hw_enable_wakeup_gpe_block()
Browse files Browse the repository at this point in the history
Since acpi_hw_enable_wakeup_gpe_block() is currently always called
after disabling all GPEs, it can actually write zeros to all
non-wakeup enable bits unconditionally.

That will be useful going forward for disabling runtime GPEs and
enabling wakeup GPEs in one go instead of doing that in two steps
(disable runtime and enable wakeup) which in theory may lead to a
loss of a wakeup event.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Rafael J. Wysocki committed Sep 30, 2014
1 parent 2670e02 commit 5a0b8de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/acpi/acpica/hwgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,11 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
/* Examine each GPE Register within the block */

for (i = 0; i < gpe_block->register_count; i++) {
if (!gpe_block->register_info[i].enable_for_wake) {
continue;
}

/* Enable all "wake" GPEs in this register */
/*
* Enable all "wake" GPEs in this register and disable the
* remaining ones.
*/

status =
acpi_hw_write(gpe_block->register_info[i].enable_for_wake,
Expand Down

0 comments on commit 5a0b8de

Please sign in to comment.