From cedeeb2319b35195e0d445b3a3ee50950caf0cbe Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Wed, 19 Dec 2012 05:38:18 +0000 Subject: [PATCH] --- yaml --- r: 350868 b: refs/heads/master c: 2f3faaba5922d3763f3e9398a2b00dc7239e2d27 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpica/acmacros.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 16331f3baf78..097ea17381b9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f06c92110b4512beffc98656286fdc60ed00a85 +refs/heads/master: 2f3faaba5922d3763f3e9398a2b00dc7239e2d27 diff --git a/trunk/drivers/acpi/acpica/acmacros.h b/trunk/drivers/acpi/acpica/acmacros.h index 5efad99f2169..1fa91f1d8994 100644 --- a/trunk/drivers/acpi/acpica/acmacros.h +++ b/trunk/drivers/acpi/acpica/acmacros.h @@ -293,6 +293,20 @@ #define ACPI_16BIT_MASK 0x0000FFFF #define ACPI_24BIT_MASK 0x00FFFFFF +/* Macros to extract flag bits from position zero */ + +#define ACPI_GET_1BIT_FLAG(value) ((value) & ACPI_1BIT_MASK) +#define ACPI_GET_2BIT_FLAG(value) ((value) & ACPI_2BIT_MASK) +#define ACPI_GET_3BIT_FLAG(value) ((value) & ACPI_3BIT_MASK) +#define ACPI_GET_4BIT_FLAG(value) ((value) & ACPI_4BIT_MASK) + +/* Macros to extract flag bits from position one and above */ + +#define ACPI_EXTRACT_1BIT_FLAG(field, position) (ACPI_GET_1BIT_FLAG ((field) >> position)) +#define ACPI_EXTRACT_2BIT_FLAG(field, position) (ACPI_GET_2BIT_FLAG ((field) >> position)) +#define ACPI_EXTRACT_3BIT_FLAG(field, position) (ACPI_GET_3BIT_FLAG ((field) >> position)) +#define ACPI_EXTRACT_4BIT_FLAG(field, position) (ACPI_GET_4BIT_FLAG ((field) >> position)) + /* * An object of type struct acpi_namespace_node can appear in some contexts * where a pointer to an object of type union acpi_operand_object can also