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 branches 'acpi-apei', 'acpi-bus', 'acpi-cppc' and 'acpi-video'

Merge assorted ACPI support fixes for 7.1-rc2:

- Fix EINJV2 memory error injection in APEI (Tony Luck)

- Add missing notifier_block structure forward declaration to
acpi_bus.h (Bartosz Golaszewski)

- Fix related_cpus inconsistency during CPU hotplug in the ACPI CPPC
library (Jinjie Ruan)

- Add a quirk to force native backlight on HP OMEN 16 (8A44) in the
ACPI video bus driver (Shivam Kalra)

* acpi-apei:
ACPI: APEI: EINJ: Fix EINJV2 memory error injection
ACPICA: Provide #defines for EINJV2 error types

* acpi-bus:
ACPI: bus: add missing forward declaration to acpi_bus.h

* acpi-cppc:
ACPI: CPPC: Fix related_cpus inconsistency during CPU hotplug

* acpi-video:
ACPI: video: force native backlight on HP OMEN 16 (8A44)

+49 -28
+30 -25
drivers/acpi/apei/einj-core.c
··· 401 401 402 402 return NULL; 403 403 } 404 + 405 + static bool is_memory_injection(u32 type, u32 flags) 406 + { 407 + if (flags & SETWA_FLAGS_EINJV2) 408 + return !!(type & ACPI_EINJV2_MEMORY); 409 + if (type & ACPI5_VENDOR_BIT) 410 + return !!(vendor_flags & SETWA_FLAGS_MEM); 411 + return !!(type & MEM_ERROR_MASK) || !!(flags & SETWA_FLAGS_MEM); 412 + } 413 + 404 414 /* Execute instructions in trigger error action table */ 405 - static int __einj_error_trigger(u64 trigger_paddr, u32 type, 415 + static int __einj_error_trigger(u64 trigger_paddr, u32 type, u32 flags, 406 416 u64 param1, u64 param2) 407 417 { 408 418 struct acpi_einj_trigger trigger_tab; ··· 490 480 * This will cause resource conflict with regular memory. So 491 481 * remove it from trigger table resources. 492 482 */ 493 - if ((param_extension || acpi5) && (type & MEM_ERROR_MASK) && param2) { 483 + if ((param_extension || acpi5) && is_memory_injection(type, flags)) { 494 484 struct apei_resources addr_resources; 495 485 496 486 apei_resources_init(&addr_resources); ··· 670 660 return rc; 671 661 trigger_paddr = apei_exec_ctx_get_output(&ctx); 672 662 if (notrigger == 0) { 673 - rc = __einj_error_trigger(trigger_paddr, type, param1, param2); 663 + rc = __einj_error_trigger(trigger_paddr, type, flags, param1, param2); 674 664 if (rc) 675 665 return rc; 676 666 } ··· 728 718 SETWA_FLAGS_PCIE_SBDF | SETWA_FLAGS_EINJV2))) 729 719 return -EINVAL; 730 720 731 - /* check if type is a valid EINJv2 error type */ 732 - if (is_v2) { 733 - if (!(type & available_error_type_v2)) 734 - return -EINVAL; 735 - } 736 - /* 737 - * We need extra sanity checks for memory errors. 738 - * Other types leap directly to injection. 739 - */ 740 - 741 - /* ensure param1/param2 existed */ 742 - if (!(param_extension || acpi5)) 743 - goto inject; 744 - 745 - /* ensure injection is memory related */ 746 - if (type & ACPI5_VENDOR_BIT) { 747 - if (vendor_flags != SETWA_FLAGS_MEM) 748 - goto inject; 749 - } else if (!(type & MEM_ERROR_MASK) && !(flags & SETWA_FLAGS_MEM)) { 750 - goto inject; 751 - } 752 - 753 721 /* 754 722 * Injections targeting a CXL 1.0/1.1 port have to be injected 755 723 * via the einj_cxl_rch_error_inject() path as that does the proper ··· 735 747 */ 736 748 if (einj_is_cxl_error_type(type) && (flags & SETWA_FLAGS_MEM)) 737 749 return -EINVAL; 750 + 751 + /* check if type is a valid EINJv2 error type */ 752 + if (is_v2) { 753 + if (!(type & available_error_type_v2)) 754 + return -EINVAL; 755 + } 756 + 757 + /* ensure param1/param2 existed */ 758 + if (!(param_extension || acpi5)) 759 + goto inject; 760 + 761 + /* 762 + * We need extra sanity checks for memory errors. 763 + * Other types leap directly to injection. 764 + */ 765 + if (!is_memory_injection(type, flags)) 766 + goto inject; 738 767 739 768 /* 740 769 * Disallow crazy address masks that give BIOS leeway to pick
+3 -3
drivers/acpi/cppc_acpi.c
··· 362 362 end: 363 363 if (cmd == CMD_WRITE) { 364 364 if (unlikely(ret)) { 365 - for_each_online_cpu(i) { 365 + for_each_possible_cpu(i) { 366 366 struct cpc_desc *desc = per_cpu(cpc_desc_ptr, i); 367 367 368 368 if (!desc) ··· 524 524 else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY) 525 525 cpu_data->shared_type = CPUFREQ_SHARED_TYPE_ANY; 526 526 527 - for_each_online_cpu(i) { 527 + for_each_possible_cpu(i) { 528 528 if (i == cpu) 529 529 continue; 530 530 531 531 match_cpc_ptr = per_cpu(cpc_desc_ptr, i); 532 532 if (!match_cpc_ptr) 533 - goto err_fault; 533 + continue; 534 534 535 535 match_pdomain = &(match_cpc_ptr->domain_info); 536 536 if (match_pdomain->domain != pdomain->domain)
+8
drivers/acpi/video_detect.c
··· 916 916 DMI_MATCH(DMI_PRODUCT_NAME, "82K8"), 917 917 }, 918 918 }, 919 + { 920 + .callback = video_detect_force_native, 921 + /* HP OMEN Gaming Laptop 16-n0xxx */ 922 + .matches = { 923 + DMI_MATCH(DMI_SYS_VENDOR, "HP"), 924 + DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16-n0xxx"), 925 + }, 926 + }, 919 927 920 928 /* 921 929 * x86 android tablets which directly control the backlight through
+2
include/acpi/acpi_bus.h
··· 17 17 #include <linux/property.h> 18 18 #include <linux/types.h> 19 19 20 + struct notifier_block; 21 + 20 22 struct acpi_handle_list { 21 23 u32 count; 22 24 acpi_handle *handles;
+6
include/acpi/actbl1.h
··· 1386 1386 #define ACPI_EINJ_CXL_MEM_FATAL (1<<17) 1387 1387 #define ACPI_EINJ_VENDOR_DEFINED (1<<31) 1388 1388 1389 + /* EINJV2 error types from EINJV2_GET_ERROR_TYPE (ACPI 6.6) */ 1390 + 1391 + #define ACPI_EINJV2_PROCESSOR (1) 1392 + #define ACPI_EINJV2_MEMORY (1<<1) 1393 + #define ACPI_EINJV2_PCIE (1<<2) 1394 + 1389 1395 /******************************************************************************* 1390 1396 * 1391 1397 * ERST - Error Record Serialization Table (ACPI 4.0)