Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'acpi-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
"Add a new ACPI-related quirk for Vexia EDU ATLA 10 tablet 5V (Hans de
Goede) and fix the MADT parsing code so that CPUs with different entry
types (LAPIC and x2APIC) are initialized in the order in which they
appear in the MADT as required by the ACPI specification (Zhang Rui)"

* tag 'acpi-6.14-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
x86/acpi: Fix LAPIC/x2APIC parsing order
ACPI: x86: Add skip i2c clients quirk for Vexia EDU ATLA 10 tablet 5V

+58 -5
+45 -5
arch/x86/kernel/acpi/boot.c
··· 227 227 } 228 228 229 229 static int __init 230 + acpi_check_lapic(union acpi_subtable_headers *header, const unsigned long end) 231 + { 232 + struct acpi_madt_local_apic *processor = NULL; 233 + 234 + processor = (struct acpi_madt_local_apic *)header; 235 + 236 + if (BAD_MADT_ENTRY(processor, end)) 237 + return -EINVAL; 238 + 239 + /* Ignore invalid ID */ 240 + if (processor->id == 0xff) 241 + return 0; 242 + 243 + /* Ignore processors that can not be onlined */ 244 + if (!acpi_is_processor_usable(processor->lapic_flags)) 245 + return 0; 246 + 247 + has_lapic_cpus = true; 248 + return 0; 249 + } 250 + 251 + static int __init 230 252 acpi_parse_lapic(union acpi_subtable_headers * header, const unsigned long end) 231 253 { 232 254 struct acpi_madt_local_apic *processor = NULL; ··· 279 257 processor->processor_id, /* ACPI ID */ 280 258 processor->lapic_flags & ACPI_MADT_ENABLED); 281 259 282 - has_lapic_cpus = true; 283 260 return 0; 284 261 } 285 262 ··· 1047 1026 static int __init acpi_parse_madt_lapic_entries(void) 1048 1027 { 1049 1028 int count, x2count = 0; 1029 + struct acpi_subtable_proc madt_proc[2]; 1030 + int ret; 1050 1031 1051 1032 if (!boot_cpu_has(X86_FEATURE_APIC)) 1052 1033 return -ENODEV; ··· 1057 1034 acpi_parse_sapic, MAX_LOCAL_APIC); 1058 1035 1059 1036 if (!count) { 1060 - count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, 1061 - acpi_parse_lapic, MAX_LOCAL_APIC); 1062 - x2count = acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_X2APIC, 1063 - acpi_parse_x2apic, MAX_LOCAL_APIC); 1037 + /* Check if there are valid LAPIC entries */ 1038 + acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC, acpi_check_lapic, MAX_LOCAL_APIC); 1039 + 1040 + /* 1041 + * Enumerate the APIC IDs in the order that they appear in the 1042 + * MADT, no matter LAPIC entry or x2APIC entry is used. 1043 + */ 1044 + memset(madt_proc, 0, sizeof(madt_proc)); 1045 + madt_proc[0].id = ACPI_MADT_TYPE_LOCAL_APIC; 1046 + madt_proc[0].handler = acpi_parse_lapic; 1047 + madt_proc[1].id = ACPI_MADT_TYPE_LOCAL_X2APIC; 1048 + madt_proc[1].handler = acpi_parse_x2apic; 1049 + ret = acpi_table_parse_entries_array(ACPI_SIG_MADT, 1050 + sizeof(struct acpi_table_madt), 1051 + madt_proc, ARRAY_SIZE(madt_proc), MAX_LOCAL_APIC); 1052 + if (ret < 0) { 1053 + pr_err("Error parsing LAPIC/X2APIC entries\n"); 1054 + return ret; 1055 + } 1056 + count = madt_proc[0].count; 1057 + x2count = madt_proc[1].count; 1064 1058 } 1065 1059 if (!count && !x2count) { 1066 1060 pr_err("No LAPIC entries present\n");
+13
drivers/acpi/x86/utils.c
··· 408 408 ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY), 409 409 }, 410 410 { 411 + /* Vexia Edu Atla 10 tablet 5V version */ 412 + .matches = { 413 + /* Having all 3 of these not set is somewhat unique */ 414 + DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), 415 + DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."), 416 + DMI_MATCH(DMI_BOARD_NAME, "To be filled by O.E.M."), 417 + /* Above strings are too generic, also match on BIOS date */ 418 + DMI_MATCH(DMI_BIOS_DATE, "05/14/2015"), 419 + }, 420 + .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | 421 + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY), 422 + }, 423 + { 411 424 /* Vexia Edu Atla 10 tablet 9V version */ 412 425 .matches = { 413 426 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),