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-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
"These fix a device enumeration problem related to _ADR matching and an
IOMMU initialization issue related to the DMAR table missing, remove
an excessive function call from the core ACPI code, update an error
message in the ACPI WDAT watchdog driver and add a way to work around
problems with unhandled GPE notifications.

Specifics:

- Fix a device enumeration issue leading to incorrect associations
between ACPI device objects and platform device objects
representing physical devices if the given device object has both
_ADR and _HID (Rafael Wysocki).

- Avoid passing NULL to acpi_put_table() during IOMMU initialization
which triggers a (rightful) warning from ACPICA (Rafael Wysocki).

- Drop an excessive call to acpi_dma_deconfigure() from the core code
that binds ACPI device objects to device objects representing
physical devices (Lorenzo Pieralisi).

- Update an error message in the ACPI WDAT watchdog driver to make it
provide more useful information (Mika Westerberg).

- Add a mechanism to work around issues with unhandled GPE
notifications that occur during system initialization and cannot be
prevented by means of sysfs (Lv Zheng)"

* tag 'acpi-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI / DMAR: Avoid passing NULL to acpi_put_table()
ACPI / scan: Prefer devices without _HID/_CID for _ADR matching
ACPI / watchdog: Print out error number when device creation fails
ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding
ACPI: Drop misplaced acpi_dma_deconfigure() call from acpi_bind_one()

+82 -5
+10
Documentation/admin-guide/kernel-parameters.txt
··· 106 106 use by PCI 107 107 Format: <irq>,<irq>... 108 108 109 + acpi_mask_gpe= [HW,ACPI] 110 + Due to the existence of _Lxx/_Exx, some GPEs triggered 111 + by unsupported hardware/firmware features can result in 112 + GPE floodings that cannot be automatically disabled by 113 + the GPE dispatcher. 114 + This facility can be used to prevent such uncontrolled 115 + GPE floodings. 116 + Format: <int> 117 + Support masking of GPEs numbered from 0x00 to 0x7f. 118 + 109 119 acpi_no_auto_serialize [HW,ACPI] 110 120 Disable auto-serialization of AML methods 111 121 AML control methods that contain the opcodes to create
+1 -1
drivers/acpi/acpi_watchdog.c
··· 114 114 pdev = platform_device_register_simple("wdat_wdt", PLATFORM_DEVID_NONE, 115 115 resources, nresources); 116 116 if (IS_ERR(pdev)) 117 - pr_err("Failed to create platform device\n"); 117 + pr_err("Device creation failed: %ld\n", PTR_ERR(pdev)); 118 118 119 119 kfree(resources); 120 120
+9 -2
drivers/acpi/glue.c
··· 98 98 if (check_children && list_empty(&adev->children)) 99 99 return -ENODEV; 100 100 101 - return sta_present ? FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE; 101 + /* 102 + * If the device has a _HID (or _CID) returning a valid ACPI/PNP 103 + * device ID, it is better to make it look less attractive here, so that 104 + * the other device with the same _ADR value (that may not have a valid 105 + * device ID) can be matched going forward. [This means a second spec 106 + * violation in a row, so whatever we do here is best effort anyway.] 107 + */ 108 + return sta_present && list_empty(&adev->pnp.ids) ? 109 + FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE; 102 110 } 103 111 104 112 struct acpi_device *acpi_find_child_device(struct acpi_device *parent, ··· 258 250 return 0; 259 251 260 252 err: 261 - acpi_dma_deconfigure(dev); 262 253 ACPI_COMPANION_SET(dev, NULL); 263 254 put_device(dev); 264 255 put_device(&acpi_dev->dev);
+1
drivers/acpi/internal.h
··· 37 37 static inline void acpi_amba_init(void) {} 38 38 #endif 39 39 int acpi_sysfs_init(void); 40 + void acpi_gpe_apply_masked_gpes(void); 40 41 void acpi_container_init(void); 41 42 void acpi_memory_hotplug_init(void); 42 43 #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
+1
drivers/acpi/scan.c
··· 2074 2074 } 2075 2075 } 2076 2076 2077 + acpi_gpe_apply_masked_gpes(); 2077 2078 acpi_update_all_gpes(); 2078 2079 acpi_ec_ecdt_start(); 2079 2080
+56
drivers/acpi/sysfs.c
··· 708 708 return result ? result : size; 709 709 } 710 710 711 + /* 712 + * A Quirk Mechanism for GPE Flooding Prevention: 713 + * 714 + * Quirks may be needed to prevent GPE flooding on a specific GPE. The 715 + * flooding typically cannot be detected and automatically prevented by 716 + * ACPI_GPE_DISPATCH_NONE check because there is a _Lxx/_Exx prepared in 717 + * the AML tables. This normally indicates a feature gap in Linux, thus 718 + * instead of providing endless quirk tables, we provide a boot parameter 719 + * for those who want this quirk. For example, if the users want to prevent 720 + * the GPE flooding for GPE 00, they need to specify the following boot 721 + * parameter: 722 + * acpi_mask_gpe=0x00 723 + * The masking status can be modified by the following runtime controlling 724 + * interface: 725 + * echo unmask > /sys/firmware/acpi/interrupts/gpe00 726 + */ 727 + 728 + /* 729 + * Currently, the GPE flooding prevention only supports to mask the GPEs 730 + * numbered from 00 to 7f. 731 + */ 732 + #define ACPI_MASKABLE_GPE_MAX 0x80 733 + 734 + static u64 __initdata acpi_masked_gpes; 735 + 736 + static int __init acpi_gpe_set_masked_gpes(char *val) 737 + { 738 + u8 gpe; 739 + 740 + if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX) 741 + return -EINVAL; 742 + acpi_masked_gpes |= ((u64)1<<gpe); 743 + 744 + return 1; 745 + } 746 + __setup("acpi_mask_gpe=", acpi_gpe_set_masked_gpes); 747 + 748 + void __init acpi_gpe_apply_masked_gpes(void) 749 + { 750 + acpi_handle handle; 751 + acpi_status status; 752 + u8 gpe; 753 + 754 + for (gpe = 0; 755 + gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count); 756 + gpe++) { 757 + if (acpi_masked_gpes & ((u64)1<<gpe)) { 758 + status = acpi_get_gpe_device(gpe, &handle); 759 + if (ACPI_SUCCESS(status)) { 760 + pr_info("Masking GPE 0x%x.\n", gpe); 761 + (void)acpi_mask_gpe(handle, gpe, TRUE); 762 + } 763 + } 764 + } 765 + } 766 + 711 767 void acpi_irq_stats_init(void) 712 768 { 713 769 acpi_status status;
+4 -2
drivers/iommu/dmar.c
··· 903 903 x86_init.iommu.iommu_init = intel_iommu_init; 904 904 #endif 905 905 906 - acpi_put_table(dmar_tbl); 907 - dmar_tbl = NULL; 906 + if (dmar_tbl) { 907 + acpi_put_table(dmar_tbl); 908 + dmar_tbl = NULL; 909 + } 908 910 up_write(&dmar_global_lock); 909 911 910 912 return ret ? 1 : -ENODEV;