Skip to content

Commit

Permalink
ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspen…
Browse files Browse the repository at this point in the history
…d/resume

Unconditionally clearing ACPI IRQs during suspend/resume can lead to
unexpected IRQ losts. This patch fixes this issue by removing such IRQ
clearing code.

If this patch triggers regression, the regression should be in the GPE
handlers that cannot correctly determine some spurious triggered events as
no-ops. Please report any regression related to this commit to the ACPI
component on kernel bugzilla. Lv Zheng.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196249
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reported-and-tested-by: Eric Bakula-Davis <ericbakuladavis@gmail.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Erik Schmauss authored and Rafael J. Wysocki committed Mar 18, 2018
1 parent 97f3c0a commit 18996f2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
9 changes: 1 addition & 8 deletions drivers/acpi/acpica/evgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)
*
* RETURN: Status
*
* DESCRIPTION: Clear a GPE of stale events and enable it.
* DESCRIPTION: Enable a GPE.
*
******************************************************************************/

Expand All @@ -115,13 +115,6 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)

ACPI_FUNCTION_TRACE(ev_enable_gpe);

/* Clear the GPE (of stale events) */

status = acpi_hw_clear_gpe(gpe_event_info);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}

/* Enable the requested GPE */

status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/acpica/hwgpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ acpi_status acpi_hw_disable_all_gpes(void)
ACPI_FUNCTION_TRACE(hw_disable_all_gpes);

status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL);
status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
return_ACPI_STATUS(status);
}

Expand Down
11 changes: 2 additions & 9 deletions drivers/acpi/acpica/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,8 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state)
return_ACPI_STATUS(status);
}

/* Clear all fixed and general purpose status bits */

status = acpi_hw_clear_acpi_status();
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}

/*
* 1) Disable/Clear all GPEs
* 1) Disable all GPEs
* 2) Enable all wakeup GPEs
*/
status = acpi_hw_disable_all_gpes();
Expand Down Expand Up @@ -299,7 +292,7 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state)
* might get fired there
*
* Restore the GPEs:
* 1) Disable/Clear all GPEs
* 1) Disable all GPEs
* 2) Enable all runtime GPEs
*/
status = acpi_hw_disable_all_gpes();
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/hwxfsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ acpi_status acpi_enter_sleep_state_s4bios(void)
}

/*
* 1) Disable/Clear all GPEs
* 1) Disable all GPEs
* 2) Enable all wakeup GPEs
*/
status = acpi_hw_disable_all_gpes();
Expand Down

0 comments on commit 18996f2

Please sign in to comment.