From 9587fe1c36fbce0f963edf47276c0caf3066cd4b Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 27 Dec 2020 16:01:03 +0100 Subject: [PATCH] [ACPICA] Update to version 20201217. CORE-17410 --- drivers/bus/acpi/acpica/dispatcher/dscontrol.c | 2 +- drivers/bus/acpi/acpica/dispatcher/dsdebug.c | 2 +- drivers/bus/acpi/acpica/dispatcher/dswexec.c | 3 +-- drivers/bus/acpi/acpica/dispatcher/dswload.c | 2 +- drivers/bus/acpi/acpica/dispatcher/dswload2.c | 2 +- drivers/bus/acpi/acpica/executer/exfldio.c | 2 +- drivers/bus/acpi/acpica/executer/exresop.c | 4 ++-- drivers/bus/acpi/acpica/executer/exstore.c | 4 ++-- drivers/bus/acpi/acpica/hardware/hwgpe.c | 2 +- drivers/bus/acpi/acpica/include/acexcep.h | 10 +++++----- drivers/bus/acpi/acpica/include/acpixf.h | 2 +- drivers/bus/acpi/acpica/include/actypes.h | 5 +++++ drivers/bus/acpi/acpica/include/platform/acgcc.h | 15 +++++++++++++++ drivers/bus/acpi/acpica/parser/psloop.c | 3 +-- drivers/bus/acpi/acpica/parser/psparse.c | 2 +- drivers/bus/acpi/acpica/utilities/utdelete.c | 2 +- drivers/bus/acpi/acpica/utilities/utstrsuppt.c | 4 ++-- media/doc/3rd Party Files.txt | 2 +- 18 files changed, 43 insertions(+), 25 deletions(-) diff --git a/drivers/bus/acpi/acpica/dispatcher/dscontrol.c b/drivers/bus/acpi/acpica/dispatcher/dscontrol.c index fda3db6f294..9c04f2b389e 100644 --- a/drivers/bus/acpi/acpica/dispatcher/dscontrol.c +++ b/drivers/bus/acpi/acpica/dispatcher/dscontrol.c @@ -102,7 +102,7 @@ AcpiDsExecBeginControlOp ( } } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case AML_IF_OP: /* diff --git a/drivers/bus/acpi/acpica/dispatcher/dsdebug.c b/drivers/bus/acpi/acpica/dispatcher/dsdebug.c index e7110e6017a..951346a12c4 100644 --- a/drivers/bus/acpi/acpica/dispatcher/dsdebug.c +++ b/drivers/bus/acpi/acpica/dispatcher/dsdebug.c @@ -146,7 +146,7 @@ AcpiDsDumpMethodStack ( /* Ignore control codes, they are not errors */ - if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL) + if (ACPI_CNTL_EXCEPTION (Status)) { return_VOID; } diff --git a/drivers/bus/acpi/acpica/dispatcher/dswexec.c b/drivers/bus/acpi/acpica/dispatcher/dswexec.c index d9d79be2080..3057a9329d3 100644 --- a/drivers/bus/acpi/acpica/dispatcher/dswexec.c +++ b/drivers/bus/acpi/acpica/dispatcher/dswexec.c @@ -664,8 +664,7 @@ AcpiDsExecEndOp ( break; } - /* Fall through */ - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case AML_INT_EVAL_SUBTREE_OP: diff --git a/drivers/bus/acpi/acpica/dispatcher/dswload.c b/drivers/bus/acpi/acpica/dispatcher/dswload.c index d3e11bc661e..62fd6e40481 100644 --- a/drivers/bus/acpi/acpica/dispatcher/dswload.c +++ b/drivers/bus/acpi/acpica/dispatcher/dswload.c @@ -267,7 +267,7 @@ AcpiDsLoad1BeginOp ( break; } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; default: diff --git a/drivers/bus/acpi/acpica/dispatcher/dswload2.c b/drivers/bus/acpi/acpica/dispatcher/dswload2.c index a916eec7fd9..4e69244de27 100644 --- a/drivers/bus/acpi/acpica/dispatcher/dswload2.c +++ b/drivers/bus/acpi/acpica/dispatcher/dswload2.c @@ -258,7 +258,7 @@ AcpiDsLoad2BeginOp ( break; } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; default: diff --git a/drivers/bus/acpi/acpica/executer/exfldio.c b/drivers/bus/acpi/acpica/executer/exfldio.c index c6fc6e0a496..ece5c19ba57 100644 --- a/drivers/bus/acpi/acpica/executer/exfldio.c +++ b/drivers/bus/acpi/acpica/executer/exfldio.c @@ -508,7 +508,7 @@ AcpiExFieldDatumIo ( * RegionField case and write the datum to the Operation Region */ - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_TYPE_LOCAL_REGION_FIELD: /* diff --git a/drivers/bus/acpi/acpica/executer/exresop.c b/drivers/bus/acpi/acpica/executer/exresop.c index e387a16de61..35f0f3a63f1 100644 --- a/drivers/bus/acpi/acpica/executer/exresop.c +++ b/drivers/bus/acpi/acpica/executer/exresop.c @@ -250,7 +250,7 @@ AcpiExResolveOperands ( TargetOp = AML_DEBUG_OP; - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_REFCLASS_ARG: case ACPI_REFCLASS_LOCAL: @@ -314,7 +314,7 @@ AcpiExResolveOperands ( * Else not a string - fall through to the normal Reference * case below */ - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ARGI_REFERENCE: /* References: */ case ARGI_INTEGER_REF: diff --git a/drivers/bus/acpi/acpica/executer/exstore.c b/drivers/bus/acpi/acpica/executer/exstore.c index 4e1cc8415a4..cb791ff2f68 100644 --- a/drivers/bus/acpi/acpica/executer/exstore.c +++ b/drivers/bus/acpi/acpica/executer/exstore.c @@ -140,7 +140,7 @@ AcpiExStore ( return_ACPI_STATUS (AE_OK); } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; default: @@ -477,7 +477,7 @@ AcpiExStoreObjectToNode ( break; } - /* Fallthrough */ + ACPI_FALLTHROUGH; case ACPI_TYPE_DEVICE: case ACPI_TYPE_EVENT: diff --git a/drivers/bus/acpi/acpica/hardware/hwgpe.c b/drivers/bus/acpi/acpica/hardware/hwgpe.c index 69061928726..63f1335e225 100644 --- a/drivers/bus/acpi/acpica/hardware/hwgpe.c +++ b/drivers/bus/acpi/acpica/hardware/hwgpe.c @@ -146,7 +146,7 @@ AcpiHwLowSetGpe ( return (AE_BAD_PARAMETER); } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_GPE_ENABLE: diff --git a/drivers/bus/acpi/acpica/include/acexcep.h b/drivers/bus/acpi/acpica/include/acexcep.h index 194f3a82732..e888ec9b2b4 100644 --- a/drivers/bus/acpi/acpica/include/acexcep.h +++ b/drivers/bus/acpi/acpica/include/acexcep.h @@ -96,11 +96,11 @@ typedef struct acpi_exception_info #define AE_OK (ACPI_STATUS) 0x0000 -#define ACPI_ENV_EXCEPTION(Status) (Status & AE_CODE_ENVIRONMENTAL) -#define ACPI_AML_EXCEPTION(Status) (Status & AE_CODE_AML) -#define ACPI_PROG_EXCEPTION(Status) (Status & AE_CODE_PROGRAMMER) -#define ACPI_TABLE_EXCEPTION(Status) (Status & AE_CODE_ACPI_TABLES) -#define ACPI_CNTL_EXCEPTION(Status) (Status & AE_CODE_CONTROL) +#define ACPI_ENV_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_ENVIRONMENTAL) +#define ACPI_AML_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_AML) +#define ACPI_PROG_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_PROGRAMMER) +#define ACPI_TABLE_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_ACPI_TABLES) +#define ACPI_CNTL_EXCEPTION(Status) (((Status) & AE_CODE_MASK) == AE_CODE_CONTROL) /* diff --git a/drivers/bus/acpi/acpica/include/acpixf.h b/drivers/bus/acpi/acpica/include/acpixf.h index 3c7ab0f7862..a3d25ab4d0d 100644 --- a/drivers/bus/acpi/acpica/include/acpixf.h +++ b/drivers/bus/acpi/acpica/include/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20201113 +#define ACPI_CA_VERSION 0x20201217 #include "acconfig.h" #include "actypes.h" diff --git a/drivers/bus/acpi/acpica/include/actypes.h b/drivers/bus/acpi/acpica/include/actypes.h index 46d934635db..e4d7be2ba69 100644 --- a/drivers/bus/acpi/acpica/include/actypes.h +++ b/drivers/bus/acpi/acpica/include/actypes.h @@ -1429,5 +1429,10 @@ typedef enum #define ACPI_OPT_END -1 +/* Definitions for explicit fallthrough */ + +#ifndef ACPI_FALLTHROUGH +#define ACPI_FALLTHROUGH do {} while(0) +#endif #endif /* __ACTYPES_H__ */ diff --git a/drivers/bus/acpi/acpica/include/platform/acgcc.h b/drivers/bus/acpi/acpica/include/platform/acgcc.h index ca5e6c42842..9fa10fd6139 100644 --- a/drivers/bus/acpi/acpica/include/platform/acgcc.h +++ b/drivers/bus/acpi/acpica/include/platform/acgcc.h @@ -88,6 +88,21 @@ typedef __builtin_va_list va_list; #define ACPI_USE_NATIVE_MATH64 +/* GCC did not support __has_attribute until 5.1. */ + +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + +/* + * Explictly mark intentional explicit fallthrough to silence + * -Wimplicit-fallthrough in GCC 7.1+. + */ + +#if __has_attribute(__fallthrough__) +#define ACPI_FALLTHROUGH __attribute__((__fallthrough__)) +#endif + #ifdef __REACTOS__ /* Flush CPU cache - used when going to sleep. Wbinvd or similar. */ diff --git a/drivers/bus/acpi/acpica/parser/psloop.c b/drivers/bus/acpi/acpica/parser/psloop.c index 22c11a318b5..305af2305e8 100644 --- a/drivers/bus/acpi/acpica/parser/psloop.c +++ b/drivers/bus/acpi/acpica/parser/psloop.c @@ -302,8 +302,7 @@ AcpiPsParseLoop ( */ WalkState->Op = NULL; Status = AcpiDsGetPredicateValue (WalkState, ACPI_TO_POINTER (TRUE)); - if (ACPI_FAILURE (Status) && - ((Status & AE_CODE_MASK) != AE_CODE_CONTROL)) + if (ACPI_FAILURE (Status) && !ACPI_CNTL_EXCEPTION (Status)) { if (Status == AE_AML_NO_RETURN_VALUE) { diff --git a/drivers/bus/acpi/acpica/parser/psparse.c b/drivers/bus/acpi/acpica/parser/psparse.c index 97c7be4d49f..9d934d35108 100644 --- a/drivers/bus/acpi/acpica/parser/psparse.c +++ b/drivers/bus/acpi/acpica/parser/psparse.c @@ -425,7 +425,7 @@ AcpiPsNextParseState ( default: Status = CallbackStatus; - if ((CallbackStatus & AE_CODE_MASK) == AE_CODE_CONTROL) + if (ACPI_CNTL_EXCEPTION (CallbackStatus)) { Status = AE_OK; } diff --git a/drivers/bus/acpi/acpica/utilities/utdelete.c b/drivers/bus/acpi/acpica/utilities/utdelete.c index a816dc7ea42..d7bcaff00eb 100644 --- a/drivers/bus/acpi/acpica/utilities/utdelete.c +++ b/drivers/bus/acpi/acpica/utilities/utdelete.c @@ -158,7 +158,7 @@ AcpiUtDeleteInternalObj ( (void) AcpiEvDeleteGpeBlock (Object->Device.GpeBlock); } - /*lint -fallthrough */ + ACPI_FALLTHROUGH; case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_THERMAL: diff --git a/drivers/bus/acpi/acpica/utilities/utstrsuppt.c b/drivers/bus/acpi/acpica/utilities/utstrsuppt.c index 1a660c743b8..9f9ae123c0d 100644 --- a/drivers/bus/acpi/acpica/utilities/utstrsuppt.c +++ b/drivers/bus/acpi/acpica/utilities/utstrsuppt.c @@ -166,7 +166,7 @@ AcpiUtConvertDecimalString ( * 1) Runtime: terminate with no error, per the ACPI spec * 2) Compiler: return an error */ - if (!isdigit (*String)) + if (!isdigit ((int) *String)) { #ifdef ACPI_ASL_COMPILER Status = AE_BAD_DECIMAL_CONSTANT; @@ -228,7 +228,7 @@ AcpiUtConvertHexString ( * 1) Runtime: terminate with no error, per the ACPI spec * 2) Compiler: return an error */ - if (!isxdigit (*String)) + if (!isxdigit ((int) *String)) { #ifdef ACPI_ASL_COMPILER Status = AE_BAD_HEX_CONSTANT; diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt index 4c5aa82804f..946ae6a5c6e 100644 --- a/media/doc/3rd Party Files.txt +++ b/media/doc/3rd Party Files.txt @@ -69,7 +69,7 @@ URL: https://gitlab.freedesktop.org/mesa/glu, ftp://ftp.freedesktop.org/pub/mesa Title: ACPICA Path: drivers/bus/acpi/acpica -Used Version: 20201113 +Used Version: 20201217 License: GPL-2.0 (https://spdx.org/licenses/GPL-2.0.html) URL: https://acpica.org/