Skip to content

Commit 28b0699

Browse files
committed
Merge branches 'acpi-pad', 'acpi-cppc', 'acpi-ec' and 'acpi-resource'
Merge assorted ACPI updates for 6.16-rc2: - Update data types of variables passed as arguments to mwait_idle_with_hints() in the ACPI PAD (processor aggregator device) driver to match the function definition after recent changes (Uros Bizjak). - Fix a NULL pointer dereference in the ACPI CPPC library that occurs when nosmp is passed to the kernel in the command line (Yunhui Cui). - Ignore ECDT tables with an invalid ID string to prevent using an incorrect GPE for signaling events on some systems (Armin Wolf). - Add a new IRQ override quirk for MACHENIKE 16P (Wentao Guan). * acpi-pad: ACPI: PAD: Update arguments of mwait_idle_with_hints() * acpi-cppc: ACPI: CPPC: Fix NULL pointer dereference when nosmp is used * acpi-ec: ACPI: EC: Ignore ECDT tables with an invalid ID string * acpi-resource: ACPI: resource: Use IRQ override on MACHENIKE 16P
5 parents 162457f + 2f76d26 + 15eece6 + 7a0d59f + c99ad98 commit 28b0699

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

drivers/acpi/acpi_pad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
static DEFINE_MUTEX(isolated_cpus_lock);
3434
static DEFINE_MUTEX(round_robin_lock);
3535

36-
static unsigned long power_saving_mwait_eax;
36+
static unsigned int power_saving_mwait_eax;
3737

3838
static unsigned char tsc_detected_unstable;
3939
static unsigned char tsc_marked_unstable;

drivers/acpi/cppc_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ bool cppc_allow_fast_switch(void)
476476
struct cpc_desc *cpc_ptr;
477477
int cpu;
478478

479-
for_each_possible_cpu(cpu) {
479+
for_each_present_cpu(cpu) {
480480
cpc_ptr = per_cpu(cpc_desc_ptr, cpu);
481481
desired_reg = &cpc_ptr->cpc_regs[DESIRED_PERF];
482482
if (!CPC_IN_SYSTEM_MEMORY(desired_reg) &&

drivers/acpi/ec.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
#include <linux/delay.h>
2424
#include <linux/interrupt.h>
2525
#include <linux/list.h>
26+
#include <linux/printk.h>
2627
#include <linux/spinlock.h>
2728
#include <linux/slab.h>
29+
#include <linux/string.h>
2830
#include <linux/suspend.h>
2931
#include <linux/acpi.h>
3032
#include <linux/dmi.h>
@@ -2031,6 +2033,21 @@ void __init acpi_ec_ecdt_probe(void)
20312033
goto out;
20322034
}
20332035

2036+
if (!strstarts(ecdt_ptr->id, "\\")) {
2037+
/*
2038+
* The ECDT table on some MSI notebooks contains invalid data, together
2039+
* with an empty ID string ("").
2040+
*
2041+
* Section 5.2.15 of the ACPI specification requires the ID string to be
2042+
* a "fully qualified reference to the (...) embedded controller device",
2043+
* so this string always has to start with a backslash.
2044+
*
2045+
* By verifying this we can avoid such faulty ECDT tables in a safe way.
2046+
*/
2047+
pr_err(FW_BUG "Ignoring ECDT due to invalid ID string \"%s\"\n", ecdt_ptr->id);
2048+
goto out;
2049+
}
2050+
20342051
ec = acpi_ec_alloc();
20352052
if (!ec)
20362053
goto out;

drivers/acpi/resource.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,13 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = {
666666
DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"),
667667
},
668668
},
669+
{
670+
/* MACHENIKE L16P/L16P */
671+
.matches = {
672+
DMI_MATCH(DMI_SYS_VENDOR, "MACHENIKE"),
673+
DMI_MATCH(DMI_BOARD_NAME, "L16P"),
674+
},
675+
},
669676
{
670677
/*
671678
* TongFang GM5HG0A in case of the SKIKK Vanaheim relabel the

0 commit comments

Comments
 (0)