Skip to content

Commit 2eb15b4

Browse files
committed
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()
2 parents 06697ca + b5539eb commit 2eb15b4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

drivers/acpi/ec.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,12 +1267,8 @@ static void acpi_ec_event_handler(struct work_struct *work)
12671267
spin_unlock_irq(&ec->lock);
12681268
}
12691269

1270-
static void acpi_ec_handle_interrupt(struct acpi_ec *ec)
1270+
static void clear_gpe_and_advance_transaction(struct acpi_ec *ec, bool interrupt)
12711271
{
1272-
unsigned long flags;
1273-
1274-
spin_lock_irqsave(&ec->lock, flags);
1275-
12761272
/*
12771273
* Clear GPE_STS upfront to allow subsequent hardware GPE_STS 0->1
12781274
* changes to always trigger a GPE interrupt.
@@ -1289,6 +1285,16 @@ static void acpi_ec_handle_interrupt(struct acpi_ec *ec)
12891285
acpi_clear_gpe(NULL, ec->gpe);
12901286

12911287
advance_transaction(ec, true);
1288+
}
1289+
1290+
static void acpi_ec_handle_interrupt(struct acpi_ec *ec)
1291+
{
1292+
unsigned long flags;
1293+
1294+
spin_lock_irqsave(&ec->lock, flags);
1295+
1296+
clear_gpe_and_advance_transaction(ec, true);
1297+
12921298
spin_unlock_irqrestore(&ec->lock, flags);
12931299
}
12941300

@@ -2083,7 +2089,7 @@ bool acpi_ec_dispatch_gpe(void)
20832089
if (acpi_ec_gpe_status_set(first_ec)) {
20842090
pm_pr_dbg("ACPI EC GPE status set\n");
20852091

2086-
advance_transaction(first_ec, false);
2092+
clear_gpe_and_advance_transaction(first_ec, false);
20872093
work_in_progress = acpi_ec_work_in_progress(first_ec);
20882094
}
20892095

0 commit comments

Comments
 (0)