summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-06-29 17:32:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-06-29 17:32:59 -0700
commit2eb15b42482bbbaa0fd611741e687c2feee21f2c (patch)
tree07f4ebd4dedb1ff5a647031aa7bebdea6a0bdaea /drivers/acpi
parent06697ca69bcaa76046be14684f513a89d2c7a240 (diff)
parentb5539eb5ee70257520e40bb636a295217c329a50 (diff)
Merge tag 'acpi-6.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki: "Fix suspend-to-idle breakage on multiple systems introduced by one of the recent commits that may cause the affected systems to overheat while suspended" * tag 'acpi-6.5-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: EC: Fix acpi_ec_dispatch_gpe()
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/ec.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 8569f55e55b6..660834a49c1f 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1267,12 +1267,8 @@ static void acpi_ec_event_handler(struct work_struct *work)
spin_unlock_irq(&ec->lock);
}
-static void acpi_ec_handle_interrupt(struct acpi_ec *ec)
+static void clear_gpe_and_advance_transaction(struct acpi_ec *ec, bool interrupt)
{
- unsigned long flags;
-
- spin_lock_irqsave(&ec->lock, flags);
-
/*
* Clear GPE_STS upfront to allow subsequent hardware GPE_STS 0->1
* changes to always trigger a GPE interrupt.
@@ -1289,6 +1285,16 @@ static void acpi_ec_handle_interrupt(struct acpi_ec *ec)
acpi_clear_gpe(NULL, ec->gpe);
advance_transaction(ec, true);
+}
+
+static void acpi_ec_handle_interrupt(struct acpi_ec *ec)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&ec->lock, flags);
+
+ clear_gpe_and_advance_transaction(ec, true);
+
spin_unlock_irqrestore(&ec->lock, flags);
}
@@ -2083,7 +2089,7 @@ bool acpi_ec_dispatch_gpe(void)
if (acpi_ec_gpe_status_set(first_ec)) {
pm_pr_dbg("ACPI EC GPE status set\n");
- advance_transaction(first_ec, false);
+ clear_gpe_and_advance_transaction(first_ec, false);
work_in_progress = acpi_ec_work_in_progress(first_ec);
}