Skip to content

Commit 24ea63e

Browse files
committed
Merge tag 'acpi-6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "These restore corner case behavior of the EC driver related to the handling of defective ACPI tables and fix a recent regression in the ACPI processor driver: - Prevent the ACPI EC driver from ignoring ECDT information in the cases when the ID string in the ECDT is invalid, but not empty, to fix thouchpad detection on ThinkBook 14 G7 IML (Armin Wolf) - Rearrange checks in acpi_processor_ppc_init() to restore the handling of frequency QoS requests related to _PPC limits inadvertently broken by a recent update (Rafael Wysocki)" * tag 'acpi-6.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: EC: Relax sanity check of the ECDT ID string ACPI: processor: perflib: Move problematic pr->performance check
2 parents c28d28a + 40f2f1a commit 24ea63e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

drivers/acpi/ec.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ void __init acpi_ec_ecdt_probe(void)
20332033
goto out;
20342034
}
20352035

2036-
if (!strstarts(ecdt_ptr->id, "\\")) {
2036+
if (!strlen(ecdt_ptr->id)) {
20372037
/*
20382038
* The ECDT table on some MSI notebooks contains invalid data, together
20392039
* with an empty ID string ("").
@@ -2042,9 +2042,13 @@ void __init acpi_ec_ecdt_probe(void)
20422042
* a "fully qualified reference to the (...) embedded controller device",
20432043
* so this string always has to start with a backslash.
20442044
*
2045-
* By verifying this we can avoid such faulty ECDT tables in a safe way.
2045+
* However some ThinkBook machines have a ECDT table with a valid EC
2046+
* description but an invalid ID string ("_SB.PC00.LPCB.EC0").
2047+
*
2048+
* Because of this we only check if the ID string is empty in order to
2049+
* avoid the obvious cases.
20462050
*/
2047-
pr_err(FW_BUG "Ignoring ECDT due to invalid ID string \"%s\"\n", ecdt_ptr->id);
2051+
pr_err(FW_BUG "Ignoring ECDT due to empty ID string\n");
20482052
goto out;
20492053
}
20502054

drivers/acpi/processor_perflib.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
180180
struct acpi_processor *pr = per_cpu(processors, cpu);
181181
int ret;
182182

183-
if (!pr || !pr->performance)
183+
if (!pr)
184184
continue;
185185

186186
/*
@@ -197,6 +197,9 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
197197
pr_err("Failed to add freq constraint for CPU%d (%d)\n",
198198
cpu, ret);
199199

200+
if (!pr->performance)
201+
continue;
202+
200203
ret = acpi_processor_get_platform_limit(pr);
201204
if (ret)
202205
pr_err("Failed to update freq constraint for CPU%d (%d)\n",

0 commit comments

Comments
 (0)