From f13c274da3896da705169409ad9b41df1ed84a33 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 14 Jan 2019 09:55:23 -0800 Subject: ACPICA: Convert more ACPI errors to firmware errors ACPICA commit f3198c12f2df9d170b3da891a180b774cfe01e59 Also adds a new firmware error function, acpi_bios_exception. Link: https://github.com/acpica/acpica/commit/f3198c12 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki --- include/acpi/acoutput.h | 2 ++ include/acpi/acpixf.h | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 6db9a6d40c85..93a280703318 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -201,6 +201,7 @@ #define ACPI_EXCEPTION(plist) acpi_exception plist #define ACPI_ERROR(plist) acpi_error plist #define ACPI_BIOS_WARNING(plist) acpi_bios_warning plist +#define ACPI_BIOS_EXCEPTION(plist) acpi_bios_exception plist #define ACPI_BIOS_ERROR(plist) acpi_bios_error plist #define ACPI_DEBUG_OBJECT(obj,l,i) acpi_ex_do_debug_object(obj,l,i) @@ -213,6 +214,7 @@ #define ACPI_EXCEPTION(plist) #define ACPI_ERROR(plist) #define ACPI_BIOS_WARNING(plist) +#define ACPI_BIOS_EXCEPTION(plist) #define ACPI_BIOS_ERROR(plist) #define ACPI_DEBUG_OBJECT(obj,l,i) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 7aa38b648564..f0adda015fc7 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -903,6 +903,12 @@ ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) acpi_bios_error(const char *module_name, u32 line_number, const char *format, ...)) +ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4) + void ACPI_INTERNAL_VAR_XFACE + acpi_bios_exception(const char *module_name, + u32 line_number, + acpi_status status, + const char *format, ...)) ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3) void ACPI_INTERNAL_VAR_XFACE acpi_bios_warning(const char *module_name, -- cgit v1.2.1 From 840c02ca2215af648c781ae680d93d8aecd083b7 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 14 Jan 2019 09:55:25 -0800 Subject: ACPICA: All acpica: Update copyrights to 2019 ACPICA commit 62f4f98e941d86e41969bf2ab5a93b8dc94dc49e The update includes userspace tool signons. Link: https://github.com/acpica/acpica/commit/62f4f98e Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki --- include/acpi/acbuffer.h | 2 +- include/acpi/acconfig.h | 2 +- include/acpi/acexcep.h | 2 +- include/acpi/acnames.h | 2 +- include/acpi/acoutput.h | 2 +- include/acpi/acpi.h | 2 +- include/acpi/acpiosxf.h | 2 +- include/acpi/acpixf.h | 2 +- include/acpi/acrestyp.h | 2 +- include/acpi/actbl.h | 2 +- include/acpi/actbl1.h | 2 +- include/acpi/actbl2.h | 2 +- include/acpi/actbl3.h | 2 +- include/acpi/actypes.h | 2 +- include/acpi/acuuid.h | 2 +- include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acenvex.h | 2 +- include/acpi/platform/acgcc.h | 2 +- include/acpi/platform/acgccex.h | 2 +- include/acpi/platform/acintel.h | 2 +- include/acpi/platform/aclinux.h | 2 +- include/acpi/platform/aclinuxex.h | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h index 6488d572739c..c2acd29f973d 100644 --- a/include/acpi/acbuffer.h +++ b/include/acpi/acbuffer.h @@ -3,7 +3,7 @@ * * Name: acbuffer.h - Support for buffers returned by ACPI predefined names * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 53c088247d36..298e15100789 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -3,7 +3,7 @@ * * Name: acconfig.h - Global configuration constants * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 09f46050961f..6b4fed5b9d11 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -3,7 +3,7 @@ * * Name: acexcep.h - Exception codes returned by the ACPI subsystem * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 6f69a4f638f8..8b3eae96706a 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h @@ -3,7 +3,7 @@ * * Name: acnames.h - Global names and strings * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 93a280703318..30b1ae53689f 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -3,7 +3,7 @@ * * Name: acoutput.h -- debug output * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index ccdc5981bc91..bc7d39ecf574 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h @@ -3,7 +3,7 @@ * * Name: acpi.h - Master public include file used to interface to ACPICA * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index eb1f21af7556..1b59fb61f67d 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h @@ -5,7 +5,7 @@ * interfaces must be implemented by OSL to interface the * ACPI components to the host operating system. * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index f0adda015fc7..3a3febc9b979 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -3,7 +3,7 @@ * * Name: acpixf.h - External interfaces to the ACPI subsystem * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 724ad5f29a16..000145ded0ec 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -3,7 +3,7 @@ * * Name: acrestyp.h - Defines, types, and structures for resource descriptors * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 0a977eca0a74..65cc9cbf1141 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h @@ -3,7 +3,7 @@ * * Name: actbl.h - Basic ACPI Table Definitions * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index ab424509cae9..45b0f532f63b 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -3,7 +3,7 @@ * * Name: actbl1.h - Additional ACPI table definitions * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index c50ef7e6b942..be01efdede32 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -3,7 +3,7 @@ * * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index ea1ca49c9c1b..a6014e9a7113 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -3,7 +3,7 @@ * * Name: actbl3.h - ACPI Table Definitions * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 2590627dbfcc..913a7cfb61e6 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -3,7 +3,7 @@ * * Name: actypes.h - Common data types for the entire ACPI subsystem * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/acuuid.h b/include/acpi/acuuid.h index e63f214531ad..23262cab047a 100644 --- a/include/acpi/acuuid.h +++ b/include/acpi/acuuid.h @@ -3,7 +3,7 @@ * * Name: acuuid.h - ACPI-related UUID/GUID definitions * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index f444e5b0fdaa..35ab3f87cc29 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -3,7 +3,7 @@ * * Name: acenv.h - Host and compiler configuration * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h index 47d690eafe4c..2e36c8344897 100644 --- a/include/acpi/platform/acenvex.h +++ b/include/acpi/platform/acenvex.h @@ -3,7 +3,7 @@ * * Name: acenvex.h - Extra host and compiler configuration * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 085db95a3dae..6a0705b433d2 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -3,7 +3,7 @@ * * Name: acgcc.h - GCC specific defines, etc. * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acgccex.h b/include/acpi/platform/acgccex.h index 5d2b667af829..8dda2856aca1 100644 --- a/include/acpi/platform/acgccex.h +++ b/include/acpi/platform/acgccex.h @@ -3,7 +3,7 @@ * * Name: acgccex.h - Extra GCC specific defines, etc. * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/acintel.h b/include/acpi/platform/acintel.h index 626265833a54..d2cc247248cb 100644 --- a/include/acpi/platform/acintel.h +++ b/include/acpi/platform/acintel.h @@ -3,7 +3,7 @@ * * Name: acintel.h - VC specific defines, etc. * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index e3d21d014fcc..9ff328fd946a 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -3,7 +3,7 @@ * * Name: aclinux.h - OS specific defines, etc. for Linux * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h index d754a1b12721..cc4f1eb53cba 100644 --- a/include/acpi/platform/aclinuxex.h +++ b/include/acpi/platform/aclinuxex.h @@ -3,7 +3,7 @@ * * Name: aclinuxex.h - Extra OS specific defines, etc. for Linux * - * Copyright (C) 2000 - 2018, Intel Corp. + * Copyright (C) 2000 - 2019, Intel Corp. * *****************************************************************************/ -- cgit v1.2.1 From 075470d88930dd16858a844f9dfb611c11f798d3 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 14 Jan 2019 09:55:26 -0800 Subject: ACPICA: Update version to 20190108 ACPICA commit aace846bb8f9b5877e100017f37fefc09dd2fde6 Version 20190108 Link: https://github.com/acpica/acpica/commit/aace846b Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 3a3febc9b979..4cc74954fea3 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -12,7 +12,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20181213 +#define ACPI_CA_VERSION 0x20190108 #include #include -- cgit v1.2.1 From f2fee24c5aae13d8170d011f97f41e1968ae5b5f Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 4 Feb 2019 16:32:10 +0100 Subject: ACPICA: Get rid of acpi_sleep_dispatch() No need for the array of structs of function pointers when we can just call the handfull of functions directly. This could be further cleaned up if acpi_gbl_reduced_hardware was defined true in the ACPI_REDUCED_HARDWARE case, but that's material for the next round. Signed-off-by: Christoph Hellwig Signed-off-by: Rafael J. Wysocki --- include/acpi/actypes.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 913a7cfb61e6..4c1395a6d82a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -885,15 +885,6 @@ typedef u8 acpi_adr_space_type; #define ACPI_ENABLE_EVENT 1 #define ACPI_DISABLE_EVENT 0 -/* Sleep function dispatch */ - -typedef acpi_status (*acpi_sleep_function) (u8 sleep_state); - -struct acpi_sleep_functions { - acpi_sleep_function legacy_function; - acpi_sleep_function extended_function; -}; - /* * External ACPI object definition */ -- cgit v1.2.1 From e147133a42cb9df6cbc99503fdf58d0e6388bf2a Mon Sep 17 00:00:00 2001 From: James Morse Date: Tue, 29 Jan 2019 18:48:40 +0000 Subject: ACPI / APEI: Make hest.c manage the estatus memory pool ghes.c has a memory pool it uses for the estatus cache and the estatus queue. The cache is initialised when registering the platform driver. For the queue, an NMI-like notification has to grow/shrink the pool as it is registered and unregistered. This is all pretty noisy when adding new NMI-like notifications, it would be better to replace this with a static pool size based on the number of users. As a precursor, move the call that creates the pool from ghes_init(), into hest.c. Later this will take the number of ghes entries and consolidate the queue allocations. Remove ghes_estatus_pool_exit() as hest.c doesn't have anywhere to put this. The pool is now initialised as part of ACPI's subsys_initcall(): (acpi_init(), acpi_scan_init(), acpi_pci_root_init(), acpi_hest_init()) Before this patch it happened later as a GHES specific device_initcall(). Signed-off-by: James Morse Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki --- include/acpi/ghes.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index 82cb4eb225a4..46ef5566e052 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -52,6 +52,8 @@ enum { GHES_SEV_PANIC = 0x3, }; +int ghes_estatus_pool_init(void); + /* From drivers/edac/ghes_edac.c */ #ifdef CONFIG_EDAC_GHES -- cgit v1.2.1 From fb7be08f1a091ec243780bfdad4bf0c492057808 Mon Sep 17 00:00:00 2001 From: James Morse Date: Tue, 29 Jan 2019 18:48:41 +0000 Subject: ACPI / APEI: Make estatus pool allocation a static size Adding new NMI-like notifications duplicates the calls that grow and shrink the estatus pool. This is all pretty pointless, as the size is capped to 64K. Allocate this for each ghes and drop the code that grows and shrinks the pool. Suggested-by: Borislav Petkov Signed-off-by: James Morse Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki --- include/acpi/ghes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index 46ef5566e052..cd9ee507d860 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -52,7 +52,7 @@ enum { GHES_SEV_PANIC = 0x3, }; -int ghes_estatus_pool_init(void); +int ghes_estatus_pool_init(int num_ghes); /* From drivers/edac/ghes_edac.c */ -- cgit v1.2.1 From eeb2555779471abdbcc6289a52dc54ce513feaf2 Mon Sep 17 00:00:00 2001 From: James Morse Date: Tue, 29 Jan 2019 18:48:42 +0000 Subject: ACPI / APEI: Don't store CPER records physical address in struct ghes When CPER records are found the address of the records is stashed in the struct ghes. Once the records have been processed, this address is overwritten with zero so that it won't be processed again without being re-populated by firmware. This goes wrong if a struct ghes can be processed concurrently, as can happen at probe time when an NMI occurs. If the NMI arrives on another CPU, the probing CPU may call ghes_clear_estatus() on the records before the handler had finished with them. Even on the same CPU, once the interrupted handler is resumed, it will call ghes_clear_estatus() on the NMIs records, this memory may have already been re-used by firmware. Avoid this stashing by letting the caller hold the address. A later patch will do away with the use of ghes->flags in the read/clear code too. Signed-off-by: James Morse Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki --- include/acpi/ghes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index cd9ee507d860..f82f4a7ddd90 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -22,7 +22,6 @@ struct ghes { struct acpi_hest_generic_v2 *generic_v2; }; struct acpi_hest_generic_status *estatus; - u64 buffer_paddr; unsigned long flags; union { struct list_head list; -- cgit v1.2.1 From 5cc6c68287ae4be22c40b41cf6844746cddebbcc Mon Sep 17 00:00:00 2001 From: James Morse Date: Tue, 29 Jan 2019 18:48:44 +0000 Subject: ACPI / APEI: Don't update struct ghes' flags in read/clear estatus ghes_read_estatus() sets a flag in struct ghes if the buffer of CPER records needs to be cleared once the records have been processed. This flag value is a problem if a struct ghes can be processed concurrently, as happens at probe time if an NMI arrives for the same error source. The NMI clears the flag, meaning the interrupted handler may never do the ghes_estatus_clear() work. The GHES_TO_CLEAR flags is only set at the same time as buffer_paddr, which is now owned by the caller and passed to ghes_clear_estatus(). Use this value as the flag. A non-zero buf_paddr returned by ghes_read_estatus() means ghes_clear_estatus() should clear this address. ghes_read_estatus() already checks for a read of error_status_address being zero, so CPER records cannot be written here. Signed-off-by: James Morse Reviewed-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki --- include/acpi/ghes.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index f82f4a7ddd90..e3f1cddb4ac8 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -13,7 +13,6 @@ * estatus: memory buffer for error status block, allocated during * HEST parsing. */ -#define GHES_TO_CLEAR 0x0001 #define GHES_EXITING 0x0002 struct ghes { -- cgit v1.2.1 From aa342261bde5ff177935c3a4f17f0bf2bf81babf Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:06 -0800 Subject: ACPICA: Remove legacy module-level code support ACPICA commit 47f5607c204719d9239a12b889df725225098c8f Module-level code refers to executable ASL code that runs during table load. This is typically used in ASL to declare named objects based on a condition evaluated during table load like so: definition_block(...) { opreation_region (OPR1, system_memory, ...) Field (OPR1) { FLD1, 8 /* Assume that FLD1's value is 0x1 */ } /* The if statement below is referred to as module-level code */ If (FLD1) { /* Declare DEV1 conditionally */ Device (DEV1) {...} } Device (DEV2) { ... } } In legacy module-level code, the execution of the If statement was deferred after other modules were loaded. The order of code execution for the table above is the following: 1.) Load OPR1 to the ACPI Namespace 2.) Load FLD1 to the ACPI Namespace (not intended for drivers) 3.) Load DEV2 to the ACPI Namespace 4.) Execute If (FLD1) and load DEV1 if the condition is true This legacy approach can be problematic for tables that look like the following: definition_block(...) { opreation_region (OPR1, system_memory, ...) Field (OPR1) { FLD1, 8 /* Assume that FLD1's value is 0x1 */ } /* The if statement below is referred to as module-level code */ If (FLD1) { /* Declare DEV1 conditionally */ Device (DEV1) {...} } Scope (DEV1) { /* Add objects DEV1's scope */ Name (OBJ1, 0x1234) } } When loading this in the legacy approach, Scope DEV1 gets evaluated before the If statement. The following is the order of execution: 1.) Load OPR1 to the ACPI Namespace 2.) Load FLD1 to the ACPI Namespace (not intended for drivers) 3.) Add OBJ1 under DEV1's scope -- ERROR. DEV1 does not exist 4.) Execute If (FLD1) and load DEV1 if the condition is true The legacy approach can never succeed for tables like this due to the deferral of the module-level code. Due to this limitation, a new module-level code was developed. This new approach exeutes if statements in the order that they appear in the definition block. With this approach, the order of execution for the above defintion block is as follows: 1.) Load OPR1 to the ACPI Namespace 2.) Load FLD1 to the ACPI Namespace (not intended for drivers) 3.) Execute If (FLD1) and load DEV1 because the condition is true 4.) Add OBJ1 under DEV1's scope. Since DEV1 is loaded in the namespace in step 3, step 4 executes successfully. This change removes support for the legacy module-level code execution. From this point onward, the new module-level code execution will be the official approach. Link: https://github.com/acpica/acpica/commit/47f5607c Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acpixf.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 4cc74954fea3..bcf3bc06eb94 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -156,14 +156,6 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE); */ ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); -/* - * Optionally support module level code by parsing an entire table as - * a method as it is loaded. Default is TRUE. - * NOTE, this is essentially obsolete and will be removed soon - * (01/2018). - */ -ACPI_INIT_GLOBAL(u8, acpi_gbl_execute_tables_as_methods, TRUE); - /* * Optionally use 32-bit FADT addresses if and when there is a conflict * (address mismatch) between the 32-bit and 64-bit versions of the -- cgit v1.2.1 From f00175d06b50a9fe7ed076dd73a8d0c36a9ef22e Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:11 -0800 Subject: ACPICA: ACPI 6.3: Add Trigger order to PCC Identifier structure in PDTT ACPICA commit b11446d8b47805c2637a2286aca34b717ec6b5be Link: https://github.com/acpica/acpica/commit/b11446d8 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/acpi') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index be01efdede32..f876a3776c75 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1361,6 +1361,7 @@ struct acpi_pdtt_channel { #define ACPI_PDTT_RUNTIME_TRIGGER (1) #define ACPI_PDTT_WAIT_COMPLETION (1<<1) +#define ACPI_PDTT_TRIGGER_ORDER (1<<2) /******************************************************************************* * -- cgit v1.2.1 From aa475a59fff172ec858093fbc8471c0993081481 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:12 -0800 Subject: ACPICA: ACPI 6.3: SRAT: add Generic Affinity Structure subtable ACPICA commit 8c9eba7811a939a387d93d6c2a572d0887e64f2c Link: https://github.com/acpica/acpica/commit/8c9eba78 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl3.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index a6014e9a7113..7a58c10ce421 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h @@ -190,7 +190,8 @@ enum acpi_srat_type { ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, ACPI_SRAT_TYPE_GICC_AFFINITY = 3, ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ - ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */ + ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */ + ACPI_SRAT_TYPE_RESERVED = 6 /* 5 and greater are reserved */ }; /* @@ -271,6 +272,22 @@ struct acpi_srat_gic_its_affinity { u32 its_id; }; +/* 5: Generic Initiator Affinity Structure (ACPI 6.3) */ + +struct acpi_srat_generic_affinity { + struct acpi_subtable_header header; + u8 reserved; + u8 device_handle_type; + u32 proximity_domain; + u8 device_handle[16]; + u32 flags; + u32 reserved1; +}; + +/* Flags for struct acpi_srat_generic_affinity */ + +#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */ + /******************************************************************************* * * STAO - Status Override Table (_STA override) - ACPI 6.0 -- cgit v1.2.1 From e646e0a50cfadae315f2db05e07a2ec072ce8d9c Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:14 -0800 Subject: ACPICA: ACPI 6.3: MADT: add support for statistical profiling in GICC ACPICA commit 31b184052a986dc8d80c878edeca574d4ffa1cf5 Link: https://github.com/acpica/acpica/commit/31b18405 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index f876a3776c75..a8e78863ac57 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -623,7 +623,7 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; /* reserved - must be zero */ }; -/* 11: Generic Interrupt (ACPI 5.0 + ACPI 6.0 changes) */ +/* 11: Generic interrupt - GICC (ACPI 5.0 + ACPI 6.0 + ACPI 6.3 changes) */ struct acpi_madt_generic_interrupt { struct acpi_subtable_header header; @@ -641,7 +641,8 @@ struct acpi_madt_generic_interrupt { u64 gicr_base_address; u64 arm_mpidr; u8 efficiency_class; - u8 reserved2[3]; + u8 reserved2[1]; + u16 spe_interrupt; /* ACPI 6.3 */ }; /* Masks for Flags field above */ -- cgit v1.2.1 From ddcfd66c1d4b3f7b91e1e2e6ac0d8f9dd7855dca Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Tue, 19 Feb 2019 11:33:40 -0800 Subject: ACPICA: ACPI 6.3: add Error Disconnect Recover Notification value ACPICA commit 205ac8fc721073f1e609df963b14ef2237aeba73 Link: https://github.com/acpica/acpica/commit/205ac8fc Reviewed-by: Colin Ian King Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 4c1395a6d82a..f73382e82c26 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -617,8 +617,9 @@ typedef u64 acpi_integer; #define ACPI_NOTIFY_SHUTDOWN_REQUEST (u8) 0x0C #define ACPI_NOTIFY_AFFINITY_UPDATE (u8) 0x0D #define ACPI_NOTIFY_MEMORY_UPDATE (u8) 0x0E +#define ACPI_NOTIFY_DISCONNECT_RECOVER (u8) 0x0F -#define ACPI_GENERIC_NOTIFY_MAX 0x0E +#define ACPI_GENERIC_NOTIFY_MAX 0x0F #define ACPI_SPECIFIC_NOTIFY_MAX 0x84 /* -- cgit v1.2.1 From b5eab512e7cffb2bb37c4b342b5594e9e75fd486 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:16 -0800 Subject: ACPICA: ACPI 6.3: PPTT add additional fields in Processor Structure Flags ACPICA commit c736ea34add19a3a07e0e398711847cd6b95affd Link: https://github.com/acpica/acpica/commit/c736ea34 Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index a8e78863ac57..6511c4ddec81 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -1474,8 +1474,11 @@ struct acpi_pptt_processor { /* Flags */ -#define ACPI_PPTT_PHYSICAL_PACKAGE (1) /* Physical package */ -#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (2) /* ACPI Processor ID valid */ +#define ACPI_PPTT_PHYSICAL_PACKAGE (1) +#define ACPI_PPTT_ACPI_PROCESSOR_ID_VALID (1<<1) +#define ACPI_PPTT_ACPI_PROCESSOR_IS_THREAD (1<<2) /* ACPI 6.3 */ +#define ACPI_PPTT_ACPI_LEAF_NODE (1<<3) /* ACPI 6.3 */ +#define ACPI_PPTT_ACPI_IDENTICAL (1<<4) /* ACPI 6.3 */ /* 1: Cache Type Structure */ -- cgit v1.2.1 From 9a8d961f1ef835b0d338fbe13da03cb424e87ae5 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:17 -0800 Subject: ACPICA: ACPI 6.3: HMAT updates ACPICA commit a216e8ca9f7c79f90788b193e2e61151b2c973c0 This change reserves several field and renames subtable 0 to "memory proximity domain attributes" Link: https://github.com/acpica/acpica/commit/a216e8ca Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl1.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 45b0f532f63b..e26d5cf30a1f 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1406,17 +1406,17 @@ struct acpi_hmat_structure { * HMAT Structures, correspond to Type in struct acpi_hmat_structure */ -/* 0: Memory subystem address range */ +/* 0: Memory proximity domain attributes */ -struct acpi_hmat_address_range { +struct acpi_hmat_proximity_domain { struct acpi_hmat_structure header; u16 flags; u16 reserved1; u32 processor_PD; /* Processor proximity domain */ u32 memory_PD; /* Memory proximity domain */ u32 reserved2; - u64 physical_address_base; /* Physical address range base */ - u64 physical_address_length; /* Physical address range length */ + u64 reserved3; + u64 reserved4; }; /* Masks for Flags field above */ -- cgit v1.2.1 From 8f5a14d0531002caf1c8978e8baddfec3ab2e824 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:18 -0800 Subject: ACPICA: ACPI 6.3: add GTDT Revision 3 support ACPICA commit 2cd926fdf360062adcaac1349cb94136590c1c74 Link: https://github.com/acpica/acpica/commit/2cd926fd Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl1.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index e26d5cf30a1f..d37ddde8bf8f 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -1001,6 +1001,11 @@ struct acpi_table_gtdt { #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1) #define ACPI_GTDT_ALWAYS_ON (1<<2) +struct acpi_gtdt_el2 { + u32 virtual_el2_timer_gsiv; + u32 virtual_el2_timer_flags; +}; + /* Common GTDT subtable header */ struct acpi_gtdt_header { -- cgit v1.2.1 From c163f90cc8620716b08ac7987c4c4ebf16444fd5 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 15 Feb 2019 13:36:19 -0800 Subject: ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acconfig.h | 2 +- include/acpi/acexcep.h | 3 ++- include/acpi/acrestyp.h | 14 +++++++------- include/acpi/actbl1.h | 4 ++-- include/acpi/actbl2.h | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) (limited to 'include/acpi') diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 298e15100789..16a83959e616 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h @@ -141,7 +141,7 @@ /* * Maximal number of elements the Result Stack can contain, - * it may be an arbitray value not exceeding the types of + * it may be an arbitrary value not exceeding the types of * result_size and result_count (now u8). */ #define ACPI_RESULTS_OBJ_NUM_MAX 255 diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 6b4fed5b9d11..233a72f169bb 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h @@ -311,7 +311,8 @@ static const struct acpi_exception_info acpi_gbl_exception_names_aml[] = { "An ACPI name contains invalid character(s)"), EXCEP_TXT("AE_AML_NAME_NOT_FOUND", "Could not resolve a named reference"), - EXCEP_TXT("AE_AML_INTERNAL", "An internal error within the interprete"), + EXCEP_TXT("AE_AML_INTERNAL", + "An internal error within the interpreter"), EXCEP_TXT("AE_AML_INVALID_SPACE_ID", "An Operation Region SpaceID is invalid"), EXCEP_TXT("AE_AML_STRING_LIMIT", diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 000145ded0ec..62930583219f 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h @@ -139,7 +139,7 @@ struct acpi_resource_irq { u8 descriptor_length; u8 triggering; u8 polarity; - u8 sharable; + u8 shareable; u8 wake_capable; u8 interrupt_count; u8 interrupts[1]; @@ -328,7 +328,7 @@ struct acpi_resource_extended_irq { u8 producer_consumer; u8 triggering; u8 polarity; - u8 sharable; + u8 shareable; u8 wake_capable; u8 interrupt_count; struct acpi_resource_source resource_source; @@ -348,7 +348,7 @@ struct acpi_resource_gpio { u8 connection_type; u8 producer_consumer; /* For values, see Producer/Consumer above */ u8 pin_config; - u8 sharable; /* For values, see Interrupt Attributes above */ + u8 shareable; /* For values, see Interrupt Attributes above */ u8 wake_capable; /* For values, see Interrupt Attributes above */ u8 io_restriction; u8 triggering; /* For values, see Interrupt Attributes above */ @@ -508,7 +508,7 @@ struct acpi_resource_uart_serialbus { struct acpi_resource_pin_function { u8 revision_id; u8 pin_config; - u8 sharable; /* For values, see Interrupt Attributes above */ + u8 shareable; /* For values, see Interrupt Attributes above */ u16 function_number; u16 pin_table_length; u16 vendor_length; @@ -520,7 +520,7 @@ struct acpi_resource_pin_function { struct acpi_resource_pin_config { u8 revision_id; u8 producer_consumer; /* For values, see Producer/Consumer above */ - u8 sharable; /* For values, see Interrupt Attributes above */ + u8 shareable; /* For values, see Interrupt Attributes above */ u8 pin_config_type; u32 pin_config_value; u16 pin_table_length; @@ -560,7 +560,7 @@ struct acpi_resource_pin_group { struct acpi_resource_pin_group_function { u8 revision_id; u8 producer_consumer; /* For values, see Producer/Consumer above */ - u8 sharable; /* For values, see Interrupt Attributes above */ + u8 shareable; /* For values, see Interrupt Attributes above */ u16 function_number; u16 vendor_length; struct acpi_resource_source resource_source; @@ -571,7 +571,7 @@ struct acpi_resource_pin_group_function { struct acpi_resource_pin_group_config { u8 revision_id; u8 producer_consumer; /* For values, see Producer/Consumer above */ - u8 sharable; /* For values, see Interrupt Attributes above */ + u8 shareable; /* For values, see Interrupt Attributes above */ u8 pin_config_type; /* For values, see pin_config_type above */ u32 pin_config_value; u16 vendor_length; diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index d37ddde8bf8f..d14037ddf108 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -562,7 +562,7 @@ struct acpi_dmar_hardware_unit { #define ACPI_DMAR_INCLUDE_ALL (1) -/* 1: Reserved Memory Defininition */ +/* 1: Reserved Memory Definition */ struct acpi_dmar_reserved_memory { struct acpi_dmar_header header; @@ -1395,7 +1395,7 @@ struct acpi_table_hmat { /* Values for HMAT structure types */ enum acpi_hmat_type { - ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */ + ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subsystem address range */ ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */ ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */ ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */ diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 6511c4ddec81..e45ced27f4c3 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -143,7 +143,7 @@ struct acpi_iort_memory_access { */ struct acpi_iort_its_group { u32 its_count; - u32 identifiers[1]; /* GIC ITS identifier arrary */ + u32 identifiers[1]; /* GIC ITS identifier array */ }; struct acpi_iort_named_component { -- cgit v1.2.1 From 6b31c01651c230c39d051170f8a258f56b02c6bc Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 15 Feb 2019 13:36:20 -0800 Subject: ACPICA: Update version to 20190215 ACPICA commit e66a8468f83fadb35aebeb534d8ef92622274696 Version 20190215 Link: https://github.com/acpica/acpica/commit/e66a8468 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index bcf3bc06eb94..24dbb4e742a6 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -12,7 +12,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20190108 +#define ACPI_CA_VERSION 0x20190215 #include #include -- cgit v1.2.1