aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-09 12:44:25 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-09 12:44:25 -0500
commit54ce685cae30c106f062d714c11e644ab1b93b51 (patch)
tree40869cc4a3aabfb6d9ef1cb4f68835cca2e8558c /drivers/acpi/bus.c
parenta051c14b8db35cb269e9d91e11fc3573b6f7475d (diff)
parentd4abd46b7e7279a61a1aa76d1d1b16a990178e75 (diff)
Merge tag 'acpi-part2-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI updates from Rafael Wysocki: "These are mostly fixes and cleanups, a few new quirks, a couple of updates related to the handling of ACPI tables and ACPICA copyrights refreshment. Specifics: - Update the ACPICA kernel code to upstream revision 20180105 including: * Assorted fixes (Jung-uk Kim) * Support for X32 ABI compilation (Anuj Mittal) * Update of ACPICA copyrights to 2018 (Bob Moore) - Prepare for future modifications to avoid executing the _STA control method too early (Hans de Goede) - Make the processor performance control library code ignore _PPC notifications if they cannot be handled and fix up the C1 idle state definition when it is used as a fallback state (Chen Yu, Yazen Ghannam) - Make it possible to use the SPCR table on x86 and to replace the original IORT table with a new one from initrd (Prarit Bhargava, Shunyong Yang) - Add battery-related quirks for Asus UX360UA and UX410UAK and add quirks for table parsing on Dell XPS 9570 and Precision M5530 (Kai Heng Feng) - Address static checker warnings in the CPPC code (Gustavo Silva) - Avoid printing a raw pointer to the kernel log in the smart battery driver (Greg Kroah-Hartman)" * tag 'acpi-part2-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: sbshc: remove raw pointer from printk() message ACPI: SPCR: Make SPCR available to x86 ACPI / CPPC: Use 64-bit arithmetic instead of 32-bit ACPI / tables: Add IORT to injectable table list ACPI / bus: Parse tables as term_list for Dell XPS 9570 and Precision M5530 ACPICA: Update version to 20180105 ACPICA: All acpica: Update copyrights to 2018 ACPI / processor: Set default C1 idle state description ACPI / battery: Add quirk for Asus UX360UA and UX410UAK ACPI: processor_perflib: Do not send _PPC change notification if not ready ACPI / scan: Use acpi_bus_get_status() to initialize ACPI_TYPE_DEVICE devs ACPI / bus: Do not call _STA on battery devices with unmet dependencies PCI: acpiphp_ibm: prepare for acpi_get_object_info() no longer returning status ACPI: export acpi_bus_get_status_handle() ACPICA: Add a missing pair of parentheses ACPICA: Prefer ACPI_TO_POINTER() over ACPI_ADD_PTR() ACPICA: Avoid NULL pointer arithmetic ACPICA: Linux: add support for X32 ABI compilation ACPI / video: Use true for boolean value
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c45
1 files changed, 38 insertions, 7 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index f87ed3be779a..676c9788e1c8 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -66,10 +66,37 @@ static int set_copy_dsdt(const struct dmi_system_id *id)
66 return 0; 66 return 0;
67} 67}
68#endif 68#endif
69static int set_gbl_term_list(const struct dmi_system_id *id)
70{
71 acpi_gbl_parse_table_as_term_list = 1;
72 return 0;
73}
69 74
70static const struct dmi_system_id dsdt_dmi_table[] __initconst = { 75static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = {
76 /*
77 * Touchpad on Dell XPS 9570/Precision M5530 doesn't work under I2C
78 * mode.
79 * https://bugzilla.kernel.org/show_bug.cgi?id=198515
80 */
81 {
82 .callback = set_gbl_term_list,
83 .ident = "Dell Precision M5530",
84 .matches = {
85 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
86 DMI_MATCH(DMI_PRODUCT_NAME, "Precision M5530"),
87 },
88 },
89 {
90 .callback = set_gbl_term_list,
91 .ident = "Dell XPS 15 9570",
92 .matches = {
93 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
94 DMI_MATCH(DMI_PRODUCT_NAME, "XPS 15 9570"),
95 },
96 },
71 /* 97 /*
72 * Invoke DSDT corruption work-around on all Toshiba Satellite. 98 * Invoke DSDT corruption work-around on all Toshiba Satellite.
99 * DSDT will be copied to memory.
73 * https://bugzilla.kernel.org/show_bug.cgi?id=14679 100 * https://bugzilla.kernel.org/show_bug.cgi?id=14679
74 */ 101 */
75 { 102 {
@@ -83,7 +110,7 @@ static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
83 {} 110 {}
84}; 111};
85#else 112#else
86static const struct dmi_system_id dsdt_dmi_table[] __initconst = { 113static const struct dmi_system_id acpi_quirks_dmi_table[] __initconst = {
87 {} 114 {}
88}; 115};
89#endif 116#endif
@@ -108,6 +135,7 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle,
108 } 135 }
109 return status; 136 return status;
110} 137}
138EXPORT_SYMBOL_GPL(acpi_bus_get_status_handle);
111 139
112int acpi_bus_get_status(struct acpi_device *device) 140int acpi_bus_get_status(struct acpi_device *device)
113{ 141{
@@ -119,6 +147,12 @@ int acpi_bus_get_status(struct acpi_device *device)
119 return 0; 147 return 0;
120 } 148 }
121 149
150 /* Battery devices must have their deps met before calling _STA */
151 if (acpi_device_is_battery(device) && device->dep_unmet) {
152 acpi_set_device_status(device, 0);
153 return 0;
154 }
155
122 status = acpi_bus_get_status_handle(device->handle, &sta); 156 status = acpi_bus_get_status_handle(device->handle, &sta);
123 if (ACPI_FAILURE(status)) 157 if (ACPI_FAILURE(status))
124 return -ENODEV; 158 return -ENODEV;
@@ -1019,11 +1053,8 @@ void __init acpi_early_init(void)
1019 1053
1020 acpi_permanent_mmap = true; 1054 acpi_permanent_mmap = true;
1021 1055
1022 /* 1056 /* Check machine-specific quirks */
1023 * If the machine falls into the DMI check table, 1057 dmi_check_system(acpi_quirks_dmi_table);
1024 * DSDT will be copied to memory
1025 */
1026 dmi_check_system(dsdt_dmi_table);
1027 1058
1028 status = acpi_reallocate_root_table(); 1059 status = acpi_reallocate_root_table();
1029 if (ACPI_FAILURE(status)) { 1060 if (ACPI_FAILURE(status)) {