diff options
Diffstat (limited to 'source/include')
| -rw-r--r-- | source/include/acexcep.h | 10 | ||||
| -rw-r--r-- | source/include/acpixf.h | 2 | ||||
| -rw-r--r-- | source/include/actypes.h | 5 | ||||
| -rw-r--r-- | source/include/platform/acgcc.h | 15 |
4 files changed, 26 insertions, 6 deletions
diff --git a/source/include/acexcep.h b/source/include/acexcep.h index 11c81398e915..8cbd75498642 100644 --- a/source/include/acexcep.h +++ b/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/source/include/acpixf.h b/source/include/acpixf.h index df45d2dc3ca8..866f22f9d78c 100644 --- a/source/include/acpixf.h +++ b/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/source/include/actypes.h b/source/include/actypes.h index 48388c2198ed..1f0a189ab4ba 100644 --- a/source/include/actypes.h +++ b/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/source/include/platform/acgcc.h b/source/include/platform/acgcc.h index 797fde3386cd..8743332561aa 100644 --- a/source/include/platform/acgcc.h +++ b/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__ */ |
