[PATCH] ACPICA: Update to version 20201217
Colin King
colin.king at canonical.com
Thu Dec 17 21:52:17 UTC 2020
From: Colin Ian King <colin.king at canonical.com>
Changes in this release of ACPICA are detailed at the following
link on the ACPICA developer mailing list:
https://lists.acpica.org/hyperkitty/list/devel@acpica.org/thread/2SUPJKO3ALTV5U4UW2IUKOTG66NJ32RG/
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpica/source/compiler/aslanalyze.c | 2 +-
src/acpica/source/compiler/aslcompiler.l | 4 ++--
src/acpica/source/compiler/aslerror.c | 2 +-
src/acpica/source/compiler/aslmethod.c | 1 +
src/acpica/source/compiler/aslparseop.c | 4 ++--
src/acpica/source/compiler/aslwalks.c | 2 +-
src/acpica/source/compiler/dtfield.c | 2 +-
src/acpica/source/compiler/dttemplate.c | 3 ++-
src/acpica/source/components/debugger/dbinput.c | 4 ++--
src/acpica/source/components/debugger/dbobject.c | 2 +-
.../source/components/disassembler/dmwalk.c | 8 ++++----
.../source/components/dispatcher/dscontrol.c | 2 +-
src/acpica/source/components/dispatcher/dsdebug.c | 2 +-
src/acpica/source/components/dispatcher/dswexec.c | 3 +--
src/acpica/source/components/dispatcher/dswload.c | 2 +-
.../source/components/dispatcher/dswload2.c | 2 +-
src/acpica/source/components/executer/exfldio.c | 2 +-
src/acpica/source/components/executer/exresop.c | 4 ++--
src/acpica/source/components/executer/exstore.c | 4 ++--
src/acpica/source/components/hardware/hwgpe.c | 2 +-
src/acpica/source/components/parser/psloop.c | 3 +--
src/acpica/source/components/parser/psparse.c | 2 +-
src/acpica/source/components/utilities/utdelete.c | 2 +-
.../source/components/utilities/utstrsuppt.c | 4 ++--
src/acpica/source/include/acexcep.h | 10 +++++-----
src/acpica/source/include/acpixf.h | 2 +-
src/acpica/source/include/actypes.h | 5 +++++
src/acpica/source/include/platform/acgcc.h | 15 +++++++++++++++
29 files changed, 61 insertions(+), 41 deletions(-)
diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c
index 63feba2b..d2c40eab 100644
--- a/src/acpica/source/compiler/aslanalyze.c
+++ b/src/acpica/source/compiler/aslanalyze.c
@@ -470,7 +470,7 @@ AnCheckMethodReturnValue (
"Method returns [%s], %s operator requires [%s]",
AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
- AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
+ AslError (ASL_WARNING, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
}
}
diff --git a/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l
index 8e448fb7..f77dfc0d 100644
--- a/src/acpica/source/compiler/aslcompiler.l
+++ b/src/acpica/source/compiler/aslcompiler.l
@@ -812,9 +812,9 @@ NamePathTail [.]{NameSeg}
"__PATH__" { count (0); return (PARSEOP___PATH__); }
"__METHOD__" { count (0); return (PARSEOP___METHOD__); }
"__EXPECT__"{ErrorCode} { char *s;
- int index = 0;
+ unsigned int index = 0;
count (0);
- while (!isdigit (AslCompilertext[index]))
+ while (!isdigit ((int) AslCompilertext[index]))
{
index++;
}
diff --git a/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c
index 15098342..51c8c9b2 100644
--- a/src/acpica/source/compiler/aslerror.c
+++ b/src/acpica/source/compiler/aslerror.c
@@ -1456,7 +1456,7 @@ AslIsExceptionDisabled (
{
return (TRUE);
}
- /* Fall through */
+ ACPI_FALLTHROUGH;
case ASL_WARNING:
case ASL_REMARK:
diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c
index 32b4b123..9f5b753b 100644
--- a/src/acpica/source/compiler/aslmethod.c
+++ b/src/acpica/source/compiler/aslmethod.c
@@ -288,6 +288,7 @@ MtMethodAnalysisWalkBegin (
NextType = Next->Asl.Child;
MethodInfo->ValidReturnTypes = MtProcessTypeOp (NextType);
+ Op->Asl.AcpiBtype |= MethodInfo->ValidReturnTypes;
/* Get the ParameterType node */
diff --git a/src/acpica/source/compiler/aslparseop.c b/src/acpica/source/compiler/aslparseop.c
index 51ef9b8c..6b17689d 100644
--- a/src/acpica/source/compiler/aslparseop.c
+++ b/src/acpica/source/compiler/aslparseop.c
@@ -414,7 +414,7 @@ TrCreateValuedLeafOp (
for (i = 0; i < ACPI_NAMESEG_SIZE; i++)
{
- if (islower (Op->Asl.Value.Name[i]))
+ if (islower ((int) Op->Asl.Value.Name[i]))
{
AcpiUtStrupr (&Op->Asl.Value.Name[i]);
AslError (ASL_REMARK, ASL_MSG_LOWER_CASE_NAMESEG, Op, Op->Asl.Value.Name);
@@ -431,7 +431,7 @@ TrCreateValuedLeafOp (
StringPtr = Op->Asl.Value.Name;
for (i = 0; *StringPtr; i++)
{
- if (islower (*StringPtr))
+ if (islower ((int) *StringPtr))
{
AcpiUtStrupr (&Op->Asl.Value.Name[i]);
AslError (ASL_REMARK, ASL_MSG_LOWER_CASE_NAMEPATH, Op, Op->Asl.Value.Name);
diff --git a/src/acpica/source/compiler/aslwalks.c b/src/acpica/source/compiler/aslwalks.c
index 215544f6..66e70264 100644
--- a/src/acpica/source/compiler/aslwalks.c
+++ b/src/acpica/source/compiler/aslwalks.c
@@ -516,7 +516,7 @@ AnOperandTypecheckWalkEnd (
break;
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
case ARGI_STORE_TARGET:
diff --git a/src/acpica/source/compiler/dtfield.c b/src/acpica/source/compiler/dtfield.c
index f976bba5..9a5729cf 100644
--- a/src/acpica/source/compiler/dtfield.c
+++ b/src/acpica/source/compiler/dtfield.c
@@ -227,7 +227,7 @@ DtCompileOneField (
break;
}
- /* Fall through. */
+ ACPI_FALLTHROUGH;
case DT_FIELD_TYPE_BUFFER:
diff --git a/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c
index 5129138f..2262c745 100644
--- a/src/acpica/source/compiler/dttemplate.c
+++ b/src/acpica/source/compiler/dttemplate.c
@@ -255,6 +255,7 @@ DtCreateTemplates (
if (AcpiGbl_Optind < 3)
{
+ fprintf (stderr, "Creating default template: [DSDT]\n");
Status = DtCreateOneTemplateFile (ACPI_SIG_DSDT, 0);
goto Exit;
}
@@ -640,7 +641,7 @@ DtCreateOneTemplate (
{
fprintf (stderr,
"Created ACPI table templates for [%4.4s] "
- "and %u [SSDT], written to \"%s\"\n",
+ "and %u [SSDT] in same file, written to \"%s\"\n",
Signature, TableCount, DisasmFilename);
}
diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
index 0cc97310..15e9f351 100644
--- a/src/acpica/source/components/debugger/dbinput.c
+++ b/src/acpica/source/components/debugger/dbinput.c
@@ -642,7 +642,7 @@ AcpiDbGetNextToken (
/* Remove any spaces at the beginning, ignore blank lines */
- while (*String && isspace (*String))
+ while (*String && isspace ((int) *String))
{
String++;
}
@@ -754,7 +754,7 @@ AcpiDbGetNextToken (
/* Find end of token */
- while (*String && !isspace (*String))
+ while (*String && !isspace ((int) *String))
{
String++;
}
diff --git a/src/acpica/source/components/debugger/dbobject.c b/src/acpica/source/components/debugger/dbobject.c
index 01d885d0..a5af85d6 100644
--- a/src/acpica/source/components/debugger/dbobject.c
+++ b/src/acpica/source/components/debugger/dbobject.c
@@ -201,7 +201,7 @@ AcpiDbDumpMethodInfo (
/* Ignore control codes, they are not errors */
- if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL)
+ if (ACPI_CNTL_EXCEPTION (Status))
{
return;
}
diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
index 76ef0aac..2359468f 100644
--- a/src/acpica/source/components/disassembler/dmwalk.c
+++ b/src/acpica/source/components/disassembler/dmwalk.c
@@ -400,7 +400,7 @@ AcpiDmBlockType (
return (BLOCK_NONE);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case AML_PACKAGE_OP:
case AML_VARIABLE_PACKAGE_OP:
@@ -422,7 +422,7 @@ AcpiDmBlockType (
return (BLOCK_NONE);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -688,7 +688,7 @@ AcpiDmDescendingOp (
return (AE_OK);
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -772,7 +772,7 @@ AcpiDmDescendingOp (
AcpiDmNamestring (NextOp->Common.Value.Name);
AcpiOsPrintf (", ");
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
diff --git a/src/acpica/source/components/dispatcher/dscontrol.c b/src/acpica/source/components/dispatcher/dscontrol.c
index 4ff0b382..32632c54 100644
--- a/src/acpica/source/components/dispatcher/dscontrol.c
+++ b/src/acpica/source/components/dispatcher/dscontrol.c
@@ -210,7 +210,7 @@ AcpiDsExecBeginControlOp (
}
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case AML_IF_OP:
/*
diff --git a/src/acpica/source/components/dispatcher/dsdebug.c b/src/acpica/source/components/dispatcher/dsdebug.c
index a7ece9b0..68d3fc2f 100644
--- a/src/acpica/source/components/dispatcher/dsdebug.c
+++ b/src/acpica/source/components/dispatcher/dsdebug.c
@@ -254,7 +254,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/src/acpica/source/components/dispatcher/dswexec.c b/src/acpica/source/components/dispatcher/dswexec.c
index 3fa7b95b..87e692a0 100644
--- a/src/acpica/source/components/dispatcher/dswexec.c
+++ b/src/acpica/source/components/dispatcher/dswexec.c
@@ -772,8 +772,7 @@ AcpiDsExecEndOp (
break;
}
- /* Fall through */
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case AML_INT_EVAL_SUBTREE_OP:
diff --git a/src/acpica/source/components/dispatcher/dswload.c b/src/acpica/source/components/dispatcher/dswload.c
index 62a4fdca..be2f4a2b 100644
--- a/src/acpica/source/components/dispatcher/dswload.c
+++ b/src/acpica/source/components/dispatcher/dswload.c
@@ -375,7 +375,7 @@ AcpiDsLoad1BeginOp (
break;
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
diff --git a/src/acpica/source/components/dispatcher/dswload2.c b/src/acpica/source/components/dispatcher/dswload2.c
index 0ab715cd..76148af3 100644
--- a/src/acpica/source/components/dispatcher/dswload2.c
+++ b/src/acpica/source/components/dispatcher/dswload2.c
@@ -366,7 +366,7 @@ AcpiDsLoad2BeginOp (
break;
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
diff --git a/src/acpica/source/components/executer/exfldio.c b/src/acpica/source/components/executer/exfldio.c
index 69f9e1a6..64be8bf1 100644
--- a/src/acpica/source/components/executer/exfldio.c
+++ b/src/acpica/source/components/executer/exfldio.c
@@ -616,7 +616,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/src/acpica/source/components/executer/exresop.c b/src/acpica/source/components/executer/exresop.c
index bf43d5d2..b0d1c740 100644
--- a/src/acpica/source/components/executer/exresop.c
+++ b/src/acpica/source/components/executer/exresop.c
@@ -358,7 +358,7 @@ AcpiExResolveOperands (
TargetOp = AML_DEBUG_OP;
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_REFCLASS_ARG:
case ACPI_REFCLASS_LOCAL:
@@ -422,7 +422,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/src/acpica/source/components/executer/exstore.c b/src/acpica/source/components/executer/exstore.c
index b374d6fa..d6b9143b 100644
--- a/src/acpica/source/components/executer/exstore.c
+++ b/src/acpica/source/components/executer/exstore.c
@@ -248,7 +248,7 @@ AcpiExStore (
return_ACPI_STATUS (AE_OK);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
default:
@@ -585,7 +585,7 @@ AcpiExStoreObjectToNode (
break;
}
- /* Fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_EVENT:
diff --git a/src/acpica/source/components/hardware/hwgpe.c b/src/acpica/source/components/hardware/hwgpe.c
index e8ad8926..c7b7a469 100644
--- a/src/acpica/source/components/hardware/hwgpe.c
+++ b/src/acpica/source/components/hardware/hwgpe.c
@@ -254,7 +254,7 @@ AcpiHwLowSetGpe (
return (AE_BAD_PARAMETER);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_GPE_ENABLE:
diff --git a/src/acpica/source/components/parser/psloop.c b/src/acpica/source/components/parser/psloop.c
index 5b4b0d98..6ccac910 100644
--- a/src/acpica/source/components/parser/psloop.c
+++ b/src/acpica/source/components/parser/psloop.c
@@ -410,8 +410,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/src/acpica/source/components/parser/psparse.c b/src/acpica/source/components/parser/psparse.c
index d935ebc2..16458bc3 100644
--- a/src/acpica/source/components/parser/psparse.c
+++ b/src/acpica/source/components/parser/psparse.c
@@ -533,7 +533,7 @@ AcpiPsNextParseState (
default:
Status = CallbackStatus;
- if ((CallbackStatus & AE_CODE_MASK) == AE_CODE_CONTROL)
+ if (ACPI_CNTL_EXCEPTION (CallbackStatus))
{
Status = AE_OK;
}
diff --git a/src/acpica/source/components/utilities/utdelete.c b/src/acpica/source/components/utilities/utdelete.c
index aafd5295..0e0500a0 100644
--- a/src/acpica/source/components/utilities/utdelete.c
+++ b/src/acpica/source/components/utilities/utdelete.c
@@ -266,7 +266,7 @@ AcpiUtDeleteInternalObj (
(void) AcpiEvDeleteGpeBlock (Object->Device.GpeBlock);
}
- /*lint -fallthrough */
+ ACPI_FALLTHROUGH;
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_THERMAL:
diff --git a/src/acpica/source/components/utilities/utstrsuppt.c b/src/acpica/source/components/utilities/utstrsuppt.c
index 153b56e8..c0ea0495 100644
--- a/src/acpica/source/components/utilities/utstrsuppt.c
+++ b/src/acpica/source/components/utilities/utstrsuppt.c
@@ -274,7 +274,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;
@@ -336,7 +336,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/src/acpica/source/include/acexcep.h b/src/acpica/source/include/acexcep.h
index 11c81398..8cbd7549 100644
--- a/src/acpica/source/include/acexcep.h
+++ b/src/acpica/source/include/acexcep.h
@@ -204,11 +204,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/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index df45d2dc..866f22f9 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -154,7 +154,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/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
index 48388c21..1f0a189a 100644
--- a/src/acpica/source/include/actypes.h
+++ b/src/acpica/source/include/actypes.h
@@ -1537,5 +1537,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/src/acpica/source/include/platform/acgcc.h b/src/acpica/source/include/platform/acgcc.h
index 797fde33..87433325 100644
--- a/src/acpica/source/include/platform/acgcc.h
+++ b/src/acpica/source/include/platform/acgcc.h
@@ -196,4 +196,19 @@ 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
+
#endif /* __ACGCC_H__ */
--
2.29.2
More information about the fwts-devel
mailing list