aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-25 17:21:18 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-25 17:21:18 -0500
commite6d1315006383e525595bb3337d08bccec373ccc (patch)
tree5f74b10179cd0b4e249c4a7bcf03ce062e6042c9 /drivers/acpi/tables.c
parent1e2af254ef130e37d9fb3cb1bc9bfbf6ea184b4a (diff)
parent3eb85368460d942005ba305829e279d0fe4767e0 (diff)
Merge tag 'acpi-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to the 20181213 upstream revision, make it possible to build the ACPI subsystem without PCI support, and a new OEM _OSI string, add a new device support to the ACPI driver for AMD SoCs and fix PM handling in the ACPI driver for Intel SoCs, fix the SPCR table handling and do some assorted fixes and cleanups. Specifics: - Update the ACPICA code in the kernel to the 20181213 upstream revision including: * New Windows _OSI strings (Bob Moore, Jung-uk Kim). * Buffers-to-string conversions update (Bob Moore). * Removal of support for expressions in package elements (Bob Moore). * New option to display method/object evaluation in debug output (Bob Moore). * Compiler improvements (Bob Moore, Erik Schmauss). * Minor debugger fix (Erik Schmauss). * Disassembler improvement (Erik Schmauss). * Assorted cleanups (Bob Moore, Colin Ian King, Erik Schmauss). - Add support for a new OEM _OSI string to indicate special handling of secondary graphics adapters on some systems (Alex Hung). - Make it possible to build the ACPI subystem without PCI support (Sinan Kaya). - Make the SPCR table handling regard baud rate 0 in accordance with the specification of it and make the DSDT override code support DSDT code names generated by recent ACPICA (Andy Shevchenko, Wang Dongsheng, Nathan Chancellor). - Add clock frequency for Hisilicon Hip08 SPI controller to the ACPI driver for AMD SoCs (APD) (Jay Fang). - Fix the PM handling during device init in the ACPI driver for Intel SoCs (LPSS) (Hans de Goede). - Avoid double panic()s by clearing the APEI GHES block_status before panic() (Lenny Szubowicz). - Clean up a function invocation in the ACPI core and get rid of some code duplication by using the DEFINE_SHOW_ATTRIBUTE macro in the APEI support code (Alexey Dobriyan, Yangtao Li)" * tag 'acpi-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (31 commits) ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode ACPI/APEI: Clear GHES block_status before panic() ACPI: Make PCI slot detection driver depend on PCI ACPI/IORT: Stub out ACS functions when CONFIG_PCI is not set arm64: select ACPI PCI code only when both features are enabled PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset ACPI: Allow CONFIG_PCI to be unset for reboot ACPI: Move PCI reset to a separate function ACPI / OSI: Add OEM _OSI string to enable dGPU direct output ACPI / tables: add DSDT AmlCode new declaration name support ACPICA: Update version to 20181213 ACPICA: change coding style to match ACPICA, no functional change ACPICA: Debug output: Add option to display method/object evaluation ACPICA: disassembler: disassemble OEMx tables as AML ACPICA: Add "Windows 2018.2" string in the _OSI support ACPICA: Expressions in package elements are not supported ACPICA: Update buffer-to-string conversions ACPICA: add comments, no functional change ACPICA: Remove defines that use deprecated flag ...
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r--drivers/acpi/tables.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 61203eebf3a1..48eabb6c2d4f 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -712,6 +712,11 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table,
712 table_length); 712 table_length);
713} 713}
714 714
715#ifdef CONFIG_ACPI_CUSTOM_DSDT
716static void *amlcode __attribute__ ((weakref("AmlCode")));
717static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code")));
718#endif
719
715acpi_status 720acpi_status
716acpi_os_table_override(struct acpi_table_header *existing_table, 721acpi_os_table_override(struct acpi_table_header *existing_table,
717 struct acpi_table_header **new_table) 722 struct acpi_table_header **new_table)
@@ -722,8 +727,11 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
722 *new_table = NULL; 727 *new_table = NULL;
723 728
724#ifdef CONFIG_ACPI_CUSTOM_DSDT 729#ifdef CONFIG_ACPI_CUSTOM_DSDT
725 if (strncmp(existing_table->signature, "DSDT", 4) == 0) 730 if (!strncmp(existing_table->signature, "DSDT", 4)) {
726 *new_table = (struct acpi_table_header *)AmlCode; 731 *new_table = (struct acpi_table_header *)&amlcode;
732 if (!(*new_table))
733 *new_table = (struct acpi_table_header *)&dsdt_amlcode;
734 }
727#endif 735#endif
728 if (*new_table != NULL) 736 if (*new_table != NULL)
729 acpi_table_taint(existing_table); 737 acpi_table_taint(existing_table);