Skip to contentSkip to conversation

ACPICA: 20160212 Release

PATCH In review Lv Zheng 4 participants 21 messages Feb 19, 2016 – Feb 24, 2016

Subsystems (2)
lore
Share & tools
lore

Lv Zheng

author
#0 lore raw

cover ACPICA: 20160212 Release

The 20160212 ACPICA kernel-resident subsystem updates are linuxized based on the linux-pm/linux-next branch.

The patchset has passed the following build/boot tests. Build tests are performed as follows:
1. i386 + allyes
2. i386 + allno
3. i386 + default + ACPI_DEBUGGER=y
4. i386 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y
5. i386 + default + ACPI_DEBUG=n + ACPI=y
6. i386 + default + ACPI=n
7. x86_64 + allyes
8. x86_64 + allno
9. x86_64 + default + ACPI_DEBUGGER=y
10.x86_64 + default + ACPI_DEBUGGER=n + ACPI_DEBUG=y 11.x86_64 + default + ACPI_DEBUG=n + ACPI=y
12.x86_64 + default + ACPI=n
Boot tests are performed as follows:
1. i386 + default + ACPI_DEBUGGER=y
2. x86_64 + default + ACPI_DEBUGGER=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "HP Compaq 8200 Elite SFF PC"
3. default: kernel configuration with following items enabled:
All hardware drivers related to the machines of i386/x86_64 All "drivers/acpi" configurations
All "drivers/platform" drivers
All other drivers that link the APIs provided by ACPICA subsystem

The divergences checking result:
Before applying (20160108 Release):
506 lines
After applying (20160212 Release):
506 lines

Bob Moore (8):
ACPICA: Remove incorrect "static" from a global structure
ACPICA: iASL: Fix some typos with the name strtoul64
ACPICA: iASL: Update to use internal acpi_ut_strtoul64 function
ACPICA: Remove unnecessary arguments to ACPI_INFO
ACPICA: ACPI 6.1: Add full support for this version of ACPI spec
ACPICA: Revert "Parser: Fix for SuperName method invocation"
ACPICA: Utilities: Update trace mechinism for acquire_object
ACPICA: Update version to 20160212

Colin Ian King (1):
ACPICA: debugger: dbconvert: free pld_info on error return path

David E. Box (1):
ACPICA: ACPI 6.0/iASL: Add support for the External AML opcode

Lv Zheng (4):
ACPICA: Tables: make default region accessible during the table load
ACPICA: ACPICA: Tune _REG evaluations order in the initialization
steps
ACPICA: Namespace: Ensure \_SB._INI executed before any _REG
ACPICA: Namespace: Rename acpi_gbl_reg_methods_enabled to
acpi_gbl_namespace_initialized

waddlesplash (1):
ACPICA: aclocal: Put parens around some definitions.

 drivers/acpi/acpica/acglobal.h  |    2 +-
 drivers/acpi/acpica/aclocal.h   |    6 +-
 drivers/acpi/acpica/acnamesp.h  |    2 +-
 drivers/acpi/acpica/acpredef.h  |   11 +-
 drivers/acpi/acpica/dbcmds.c    |    2 +-
 drivers/acpi/acpica/dbconvert.c |    5 +-
 drivers/acpi/acpica/dsmethod.c  |    3 +-
 drivers/acpi/acpica/dsobject.c  |    3 +-
 drivers/acpi/acpica/evgpeblk.c  |    3 +-
 drivers/acpi/acpica/evgpeinit.c |    2 +-
 drivers/acpi/acpica/evregion.c  |    2 +-
 drivers/acpi/acpica/exconfig.c  |    4 +-
 drivers/acpi/acpica/exoparg3.c  |    4 +-
 drivers/acpi/acpica/nseval.c    |    3 +-
 drivers/acpi/acpica/nsinit.c    |  135 ++++++++++++---------
 drivers/acpi/acpica/psargs.c    |    9 +-
 drivers/acpi/acpica/tbinstal.c  |    5 +-
 drivers/acpi/acpica/tbprint.c   |    7 +-
 drivers/acpi/acpica/tbutils.c   |    4 +-
 drivers/acpi/acpica/tbxfload.c  |   28 ++++-
 drivers/acpi/acpica/utcache.c   |    2 +-
 drivers/acpi/acpica/utdecode.c  |   30 ++---
 drivers/acpi/acpica/utnonansi.c |  246 ++++++++++++++++++++++++++++++++-------
 drivers/acpi/acpica/uttrack.c   |    2 +-
 drivers/acpi/acpica/utxferror.c |    3 +-
 drivers/acpi/acpica/utxfinit.c  |   42 +++----
 include/acpi/acoutput.h         |    2 +-
 include/acpi/acpixf.h           |    8 +-
 include/acpi/actbl.h            |    2 +-
 include/acpi/actbl1.h           |   29 ++++-
 include/acpi/actypes.h          |    3 +-
 31 files changed, 418 insertions(+), 191 deletions(-)
Signature · 1 line
1.7.10
author
#1 lore raw

PATCH 1/15 ACPICA: aclocal: Put parens around some definitions.

From: waddlesplash <[email protected]>

ACPICA commit 7100a109f7d6523330d29f4d088cf1ffb756025f

Looking at where these are used, this shouldn't result in any behavioral changes, but it's best practices to have them.

---
 drivers/acpi/acpica/aclocal.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/acpica/aclocal.h +3 -3
index e4977fa..9562a10 100644
@@ -85,7 +85,7 @@ union acpi_parse_object;
 #define ACPI_MTX_MEMORY                 5	/* Debug memory tracking lists */
 
 #define ACPI_MAX_MUTEX                  5
-#define ACPI_NUM_MUTEX                  ACPI_MAX_MUTEX+1
+#define ACPI_NUM_MUTEX                  (ACPI_MAX_MUTEX+1)
 
 /* Lock structure for reader/writer interfaces */
 
@@ -103,11 +103,11 @@ struct acpi_rw_lock {
 #define ACPI_LOCK_HARDWARE              1
 
 #define ACPI_MAX_LOCK                   1
-#define ACPI_NUM_LOCK                   ACPI_MAX_LOCK+1
+#define ACPI_NUM_LOCK                   (ACPI_MAX_LOCK+1)
 
 /* This Thread ID means that the mutex is not in use (unlocked) */
 
-#define ACPI_MUTEX_NOT_ACQUIRED         (acpi_thread_id) 0
+#define ACPI_MUTEX_NOT_ACQUIRED         ((acpi_thread_id) 0)
 
 /* This Thread ID means an invalid thread ID */
 
Signature · 1 line
1.7.10
author
#2 lore raw

PATCH 2/15 ACPICA: Remove incorrect "static" from a global structure

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 7a9956a2afd3863fa7d9fe4a64a957389d09f3c2

Reported by Colin Ian King. ACPICA BZ 1239.

---
 drivers/acpi/acpica/acpredef.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/acpredef.h +1 -1
index 52f6bee..5faeab4 100644
@@ -1125,7 +1125,7 @@ const union acpi_predefined_info acpi_gbl_resource_names[] = {
 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
 };
 
-static const union acpi_predefined_info acpi_gbl_scope_names[] = {
+const union acpi_predefined_info acpi_gbl_scope_names[] = {
 	{{"_GPE", 0, 0}},
 	{{"_PR_", 0, 0}},
 	{{"_SB_", 0, 0}},
Signature · 1 line
1.7.10
author
#3 lore raw

PATCH 3/15 ACPICA: iASL: Fix some typos with the name strtoul64

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit e9622aa824e00997dc92e8638733b7553a4dba26

Was defined as stroul64 in some places.

---
 drivers/acpi/acpica/utnonansi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/utnonansi.c +1 -1
index c427a5c..d1f4a47 100644
@@ -171,7 +171,7 @@ acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer)
 	u8 sign_of0x = 0;
 	u8 term = 0;
 
-	ACPI_FUNCTION_TRACE_STR(ut_stroul64, string);
+	ACPI_FUNCTION_TRACE_STR(ut_strtoul64, string);
 
 	switch (base) {
 	case ACPI_ANY_BASE:
Signature · 1 line
1.7.10
author
#4 lore raw

PATCH 4/15 ACPICA: iASL: Update to use internal acpi_ut_strtoul64 function

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit e959584d23b520c53700e90282312d17b9603ed5

Was using a local Strtoul64, update to use the common acpi_ut_strtoul64 and remove the local Strtoul64.

---
 drivers/acpi/acpica/utnonansi.c |  244 +++++++++++++++++++++++++++++++++------
 1 file changed, 206 insertions(+), 38 deletions(-)
drivers/acpi/acpica/utnonansi.c +206 -38
index d1f4a47..d5c3adf 100644
@@ -140,6 +140,67 @@ int acpi_ut_stricmp(char *string1, char *string2)
 	return (c1 - c2);
 }
 
+#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ut_safe_strcpy, acpi_ut_safe_strcat, acpi_ut_safe_strncat
+ *
+ * PARAMETERS:  Adds a "DestSize" parameter to each of the standard string
+ *              functions. This is the size of the Destination buffer.
+ *
+ * RETURN:      TRUE if the operation would overflow the destination buffer.
+ *
+ * DESCRIPTION: Safe versions of standard Clib string functions. Ensure that
+ *              the result of the operation will not overflow the output string
+ *              buffer.
+ *
+ * NOTE:        These functions are typically only helpful for processing
+ *              user input and command lines. For most ACPICA code, the
+ *              required buffer length is precisely calculated before buffer
+ *              allocation, so the use of these functions is unnecessary.
+ *
+ ******************************************************************************/
+
+u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source)
+{
+
+	if (strlen(source) >= dest_size) {
+		return (TRUE);
+	}
+
+	strcpy(dest, source);
+	return (FALSE);
+}
+
+u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source)
+{
+
+	if ((strlen(dest) + strlen(source)) >= dest_size) {
+		return (TRUE);
+	}
+
+	strcat(dest, source);
+	return (FALSE);
+}
+
+u8
+acpi_ut_safe_strncat(char *dest,
+		     acpi_size dest_size,
+		     char *source, acpi_size max_transfer_length)
+{
+	acpi_size actual_transfer_length;
+
+	actual_transfer_length = ACPI_MIN(max_transfer_length, strlen(source));
+
+	if ((strlen(dest) + actual_transfer_length) >= dest_size) {
+		return (TRUE);
+	}
+
+	strncat(dest, source, max_transfer_length);
+	return (FALSE);
+}
+#endif
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ut_strtoul64
@@ -155,7 +216,15 @@ int acpi_ut_stricmp(char *string1, char *string2)
  *              32-bit or 64-bit conversion, depending on the current mode
  *              of the interpreter.
  *
- * NOTE:        Does not support Octal strings, not needed.
+ * NOTES:       acpi_gbl_integer_byte_width should be set to the proper width.
+ *              For the core ACPICA code, this width depends on the DSDT
+ *              version. For iASL, the default byte width is always 8.
+ *
+ *              Does not support Octal strings, not needed at this time.
+ *
+ *              There is an earlier version of the function after this one,
+ *              below. It is slightly different than this one, and the two
+ *              may eventually may need to be merged. (01/2016).
  *
  ******************************************************************************/
 
@@ -318,63 +387,162 @@ error_exit:
 	}
 }
 
-#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
+#ifdef _OBSOLETE_FUNCTIONS
+/* TBD: use version in ACPICA main code base? */
+/* DONE: 01/2016 */
+
 /*******************************************************************************
  *
- * FUNCTION:    acpi_ut_safe_strcpy, acpi_ut_safe_strcat, acpi_ut_safe_strncat
+ * FUNCTION:    strtoul64
  *
- * PARAMETERS:  Adds a "DestSize" parameter to each of the standard string
- *              functions. This is the size of the Destination buffer.
+ * PARAMETERS:  string              - Null terminated string
+ *              terminater          - Where a pointer to the terminating byte
+ *                                    is returned
+ *              base                - Radix of the string
  *
- * RETURN:      TRUE if the operation would overflow the destination buffer.
+ * RETURN:      Converted value
  *
- * DESCRIPTION: Safe versions of standard Clib string functions. Ensure that
- *              the result of the operation will not overflow the output string
- *              buffer.
- *
- * NOTE:        These functions are typically only helpful for processing
- *              user input and command lines. For most ACPICA code, the
- *              required buffer length is precisely calculated before buffer
- *              allocation, so the use of these functions is unnecessary.
+ * DESCRIPTION: Convert a string into an unsigned value.
  *
  ******************************************************************************/
 
-u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source)
+acpi_status strtoul64(char *string, u32 base, u64 *ret_integer)
 {
+	u32 index;
+	u32 sign;
+	u64 return_value = 0;
+	acpi_status status = AE_OK;
 
-	if (strlen(source) >= dest_size) {
-		return (TRUE);
+	*ret_integer = 0;
+
+	switch (base) {
+	case 0:
+	case 8:
+	case 10:
+	case 16:
+
+		break;
+
+	default:
+		/*
+		 * The specified Base parameter is not in the domain of
+		 * this function:
+		 */
+		return (AE_BAD_PARAMETER);
 	}
 
-	strcpy(dest, source);
-	return (FALSE);
-}
+	/* Skip over any white space in the buffer: */
 
-u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source)
-{
+	while (isspace((int)*string) || *string == '\t') {
+		++string;
+	}
 
-	if ((strlen(dest) + strlen(source)) >= dest_size) {
-		return (TRUE);
+	/*
+	 * The buffer may contain an optional plus or minus sign.
+	 * If it does, then skip over it but remember what is was:
+	 */
+	if (*string == '-') {
+		sign = ACPI_SIGN_NEGATIVE;
+		++string;
+	} else if (*string == '+') {
+		++string;
+		sign = ACPI_SIGN_POSITIVE;
+	} else {
+		sign = ACPI_SIGN_POSITIVE;
 	}
 
-	strcat(dest, source);
-	return (FALSE);
-}
+	/*
+	 * If the input parameter Base is zero, then we need to
+	 * determine if it is octal, decimal, or hexadecimal:
+	 */
+	if (base == 0) {
+		if (*string == '0') {
+			if (tolower((int)*(++string)) == 'x') {
+				base = 16;
+				++string;
+			} else {
+				base = 8;
+			}
+		} else {
+			base = 10;
+		}
+	}
 
-u8
-acpi_ut_safe_strncat(char *dest,
-		     acpi_size dest_size,
-		     char *source, acpi_size max_transfer_length)
-{
-	acpi_size actual_transfer_length;
+	/*
+	 * For octal and hexadecimal bases, skip over the leading
+	 * 0 or 0x, if they are present.
+	 */
+	if (base == 8 && *string == '0') {
+		string++;
+	}
 
-	actual_transfer_length = ACPI_MIN(max_transfer_length, strlen(source));
+	if (base == 16 && *string == '0' && tolower((int)*(++string)) == 'x') {
+		string++;
+	}
 
-	if ((strlen(dest) + actual_transfer_length) >= dest_size) {
-		return (TRUE);
+	/* Main loop: convert the string to an unsigned long */
+
+	while (*string) {
+		if (isdigit((int)*string)) {
+			index = ((u8)*string) - '0';
+		} else {
+			index = (u8)toupper((int)*string);
+			if (isupper((int)index)) {
+				index = index - 'A' + 10;
+			} else {
+				goto error_exit;
+			}
+		}
+
+		if (index >= base) {
+			goto error_exit;
+		}
+
+		/* Check to see if value is out of range: */
+
+		if (return_value > ((ACPI_UINT64_MAX - (u64)index) / (u64)base)) {
+			goto error_exit;
+		} else {
+			return_value *= base;
+			return_value += index;
+		}
+
+		++string;
 	}
 
-	strncat(dest, source, max_transfer_length);
-	return (FALSE);
+	/* If a minus sign was present, then "the conversion is negated": */
+
+	if (sign == ACPI_SIGN_NEGATIVE) {
+		return_value = (ACPI_UINT32_MAX - return_value) + 1;
+	}
+
+	*ret_integer = return_value;
+	return (status);
+
+error_exit:
+	switch (base) {
+	case 8:
+
+		status = AE_BAD_OCTAL_CONSTANT;
+		break;
+
+	case 10:
+
+		status = AE_BAD_DECIMAL_CONSTANT;
+		break;
+
+	case 16:
+
+		status = AE_BAD_HEX_CONSTANT;
+		break;
+
+	default:
+
+		/* Base validated above */
+
+		break;
+	}
+
+	return (status);
 }
 #endif
Signature · 1 line
1.7.10
author
#5 lore raw

PATCH 5/15 ACPICA: debugger: dbconvert: free pld_info on error return path

In reply to Lv Zheng

From: Colin Ian King <[email protected]>

ACPICA commit 23e644670539e23818fa81e2af5e89ad6657e75c

A failed allocation of new_buffer causes a leak of pld_info because the error return path fails to free pld_info. Ensure it is freed on the error exit path.

---
 drivers/acpi/acpica/dbconvert.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/acpi/acpica/dbconvert.c +3 -2
index 9fee88f..68f4e0f4 100644
@@ -408,7 +408,7 @@ void acpi_db_dump_pld_buffer(union acpi_object *obj_desc)
 
 	new_buffer = acpi_db_encode_pld_buffer(pld_info);
 	if (!new_buffer) {
-		return;
+		goto exit;
 	}
 
 	/* The two bit-packed buffers should match */
@@ -479,6 +479,7 @@ void acpi_db_dump_pld_buffer(union acpi_object *obj_desc)
 			       pld_info->horizontal_offset);
 	}
 
-	ACPI_FREE(pld_info);
 	ACPI_FREE(new_buffer);
+exit:
+	ACPI_FREE(pld_info);
 }
Signature · 1 line
1.7.10
author
#6 lore raw

PATCH 6/15 ACPICA: Remove unnecessary arguments to ACPI_INFO

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 181f56605a771e0b91e24b0648d2565ca70bea20

This is used as a purely infomation message, without module name and line number information. Therefore, these arguments are not needed and they are unnecessary overhead. Arguments are removed.
ACPICA BZ 872.

---
 drivers/acpi/acpica/dbcmds.c    |    2 +-
 drivers/acpi/acpica/dsmethod.c  |    3 +--
 drivers/acpi/acpica/dsobject.c  |    3 +--
 drivers/acpi/acpica/evgpeblk.c  |    3 +--
 drivers/acpi/acpica/evgpeinit.c |    2 +-
 drivers/acpi/acpica/exconfig.c  |    4 ++--
 drivers/acpi/acpica/nseval.c    |    3 +--
 drivers/acpi/acpica/tbinstal.c  |    5 ++---
 drivers/acpi/acpica/tbprint.c   |    7 +++----
 drivers/acpi/acpica/tbutils.c   |    4 +---
 drivers/acpi/acpica/tbxfload.c  |    6 ++----
 drivers/acpi/acpica/uttrack.c   |    2 +-
 drivers/acpi/acpica/utxferror.c |    3 +--
 include/acpi/acpixf.h           |    6 ++----
 14 files changed, 20 insertions(+), 33 deletions(-)
drivers/acpi/acpica/dbcmds.c +1 -1
index 7ec62c4..772178c 100644
@@ -348,7 +348,7 @@ void acpi_db_display_table_info(char *table_arg)
 		} else {
 			/* If the pointer is null, the table has been unloaded */
 
-			ACPI_INFO((AE_INFO, "%4.4s - Table has been unloaded",
+			ACPI_INFO(("%4.4s - Table has been unloaded",
 				   table_desc->signature.ascii));
 		}
 	}
drivers/acpi/acpica/dsmethod.c +1 -2
index 6a72047..1982310 100644
@@ -809,8 +809,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
 		if (method_desc->method.
 		    info_flags & ACPI_METHOD_SERIALIZED_PENDING) {
 			if (walk_state) {
-				ACPI_INFO((AE_INFO,
-					   "Marking method %4.4s as Serialized "
+				ACPI_INFO(("Marking method %4.4s as Serialized "
 					   "because of AE_ALREADY_EXISTS error",
 					   walk_state->method_node->name.
 					   ascii));
drivers/acpi/acpica/dsobject.c +1 -2
index c303e9d..a91de2b 100644
@@ -524,8 +524,7 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
 			arg = arg->common.next;
 		}
 
-		ACPI_INFO((AE_INFO,
-			   "Actual Package length (%u) is larger than "
+		ACPI_INFO(("Actual Package length (%u) is larger than "
 			   "NumElements field (%u), truncated",
 			   i, element_count));
 	} else if (i < element_count) {
drivers/acpi/acpica/evgpeblk.c +1 -2
index 9275e62..447fa1c 100644
@@ -499,8 +499,7 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
 	}
 
 	if (gpe_enabled_count) {
-		ACPI_INFO((AE_INFO,
-			   "Enabled %u GPEs in block %02X to %02X",
+		ACPI_INFO(("Enabled %u GPEs in block %02X to %02X",
 			   gpe_enabled_count, (u32)gpe_block->block_base_number,
 			   (u32)(gpe_block->block_base_number +
 				 (gpe_block->gpe_count - 1))));
drivers/acpi/acpica/evgpeinit.c +1 -1
index 9fdd8d0..7dc7547 100644
@@ -281,7 +281,7 @@ void acpi_ev_update_gpes(acpi_owner_id table_owner_id)
 	}
 
 	if (walk_info.count) {
-		ACPI_INFO((AE_INFO, "Enabled %u new GPEs", walk_info.count));
+		ACPI_INFO(("Enabled %u new GPEs", walk_info.count));
 	}
 
 	(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
drivers/acpi/acpica/exconfig.c +2 -2
index 011df21..f741613 100644
@@ -252,7 +252,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
 
 	status = acpi_get_table_by_index(table_index, &table);
 	if (ACPI_SUCCESS(status)) {
-		ACPI_INFO((AE_INFO, "Dynamic OEM Table Load:"));
+		ACPI_INFO(("Dynamic OEM Table Load:"));
 		acpi_tb_print_table_header(0, table);
 	}
 
@@ -472,7 +472,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 
 	/* Install the new table into the local data structures */
 
-	ACPI_INFO((AE_INFO, "Dynamic OEM Table Load:"));
+	ACPI_INFO(("Dynamic OEM Table Load:"));
 	(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
 
 	status = acpi_tb_install_standard_table(ACPI_PTR_TO_PHYSADDR(table),
drivers/acpi/acpica/nseval.c +1 -2
index 65d58be..5d59cfc 100644
@@ -378,8 +378,7 @@ void acpi_ns_exec_module_code_list(void)
 		acpi_ut_remove_reference(prev);
 	}
 
-	ACPI_INFO((AE_INFO,
-		   "Executed %u blocks of module-level executable AML code",
+	ACPI_INFO(("Executed %u blocks of module-level executable AML code",
 		   method_count));
 
 	ACPI_FREE(info);
drivers/acpi/acpica/tbinstal.c +2 -3
index b661a1e..4dc6108 100644
@@ -267,8 +267,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
 	if (!reload &&
 	    acpi_gbl_disable_ssdt_table_install &&
 	    ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) {
-		ACPI_INFO((AE_INFO,
-			   "Ignoring installation of %4.4s at %8.8X%8.8X",
+		ACPI_INFO(("Ignoring installation of %4.4s at %8.8X%8.8X",
 			   new_table_desc.signature.ascii,
 			   ACPI_FORMAT_UINT64(address)));
 		goto release_and_exit;
@@ -432,7 +431,7 @@ finish_override:
 		return;
 	}
 
-	ACPI_INFO((AE_INFO, "%4.4s 0x%8.8X%8.8X"
+	ACPI_INFO(("%4.4s 0x%8.8X%8.8X"
 		   " %s table override, new table: 0x%8.8X%8.8X",
 		   old_table_desc->signature.ascii,
 		   ACPI_FORMAT_UINT64(old_table_desc->address),
drivers/acpi/acpica/tbprint.c +3 -4
index fd4146d..26d61db 100644
@@ -132,7 +132,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
 
 		/* FACS only has signature and length fields */
 
-		ACPI_INFO((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X",
+		ACPI_INFO(("%-4.4s 0x%8.8X%8.8X %06X",
 			   header->signature, ACPI_FORMAT_UINT64(address),
 			   header->length));
 	} else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {
@@ -144,7 +144,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
 		       ACPI_OEM_ID_SIZE);
 		acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
 
-		ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
+		ACPI_INFO(("RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
 			   ACPI_FORMAT_UINT64(address),
 			   (ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
 			    revision >
@@ -158,8 +158,7 @@ acpi_tb_print_table_header(acpi_physical_address address,
 
 		acpi_tb_cleanup_table_header(&local_header, header);
 
-		ACPI_INFO((AE_INFO,
-			   "%-4.4s 0x%8.8X%8.8X"
+		ACPI_INFO(("%-4.4s 0x%8.8X%8.8X"
 			   " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
 			   local_header.signature, ACPI_FORMAT_UINT64(address),
 			   local_header.length, local_header.revision,
drivers/acpi/acpica/tbutils.c +1 -3
index 3269bef..9240c76 100644
@@ -174,9 +174,7 @@ struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index)
 				      ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL,
 				      new_table);
 
-	ACPI_INFO((AE_INFO,
-		   "Forced DSDT copy: length 0x%05X copied locally, original unmapped",
-		   new_table->length));
+	ACPI_INFO(("Forced DSDT copy: length 0x%05X copied locally, original unmapped", new_table->length));
 
 	return (new_table);
 }
drivers/acpi/acpica/tbxfload.c +2 -4
index 278666e..c89943b 100644
@@ -206,9 +206,7 @@ acpi_status acpi_tb_load_namespace(void)
 	}
 
 	if (!tables_failed) {
-		ACPI_INFO((AE_INFO,
-			   "%u ACPI AML tables successfully acquired and loaded\n",
-			   tables_loaded));
+		ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded\n", tables_loaded));
 	} else {
 		ACPI_ERROR((AE_INFO,
 			    "%u table load failures, %u successful",
@@ -301,7 +299,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table)
 
 	/* Install the table and load it into the namespace */
 
-	ACPI_INFO((AE_INFO, "Host-directed Dynamic ACPI Table Load:"));
+	ACPI_INFO(("Host-directed Dynamic ACPI Table Load:"));
 	(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
 
 	status = acpi_tb_install_standard_table(ACPI_PTR_TO_PHYSADDR(table),
drivers/acpi/acpica/uttrack.c +1 -1
index c7c2bb8..60c406a 100644
@@ -712,7 +712,7 @@ void acpi_ut_dump_allocations(u32 component, const char *module)
 	/* Print summary */
 
 	if (!num_outstanding) {
-		ACPI_INFO((AE_INFO, "No outstanding allocations"));
+		ACPI_INFO(("No outstanding allocations"));
 	} else {
 		ACPI_ERROR((AE_INFO, "%u(0x%X) Outstanding allocations",
 			    num_outstanding, num_outstanding));
drivers/acpi/acpica/utxferror.c +1 -2
index 6fe5959..d9f15cb 100644
@@ -175,8 +175,7 @@ ACPI_EXPORT_SYMBOL(acpi_warning)
  * TBD: module_name and line_number args are not needed, should be removed.
  *
  ******************************************************************************/
-void ACPI_INTERNAL_VAR_XFACE
-acpi_info(const char *module_name, u32 line_number, const char *format, ...)
+void ACPI_INTERNAL_VAR_XFACE acpi_info(const char *format, ...)
 {
 	va_list arg_list;
 
include/acpi/acpixf.h +2 -4
index c96621e..1755697 100644
@@ -897,11 +897,9 @@ ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
 				acpi_warning(const char *module_name,
 					     u32 line_number,
 					     const char *format, ...))
-ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
+ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
 				void ACPI_INTERNAL_VAR_XFACE
-				acpi_info(const char *module_name,
-					  u32 line_number,
-					  const char *format, ...))
+				acpi_info(const char *format, ...))
 ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
 				void ACPI_INTERNAL_VAR_XFACE
 				acpi_bios_error(const char *module_name,
Signature · 1 line
1.7.10
author
#7 lore raw

PATCH 7/15 ACPICA: ACPI 6.0/iASL: Add support for the External AML opcode

In reply to Lv Zheng

From: "David E. Box" <[email protected]>

ACPICA commit 882892feeafe8b8e5be10463133405cd4f1309d9

Support for both the compiler and disassembler. Also, the interpreter will ignore this opcode if it is ever encountered (should not happen). David Box.

---
 drivers/acpi/acpica/exoparg3.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/acpica/exoparg3.c +3 -1
index 28eb861..5aa21c4 100644
@@ -123,8 +123,10 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
 		 * op is intended for use by disassemblers in order to properly
 		 * disassemble control method invocations. The opcode or group of
 		 * opcodes should be surrounded by an "if (0)" clause to ensure that
-		 * AML interpreters never see the opcode.
+		 * AML interpreters never see the opcode. Thus, something is
+		 * wrong if an external opcode ever gets here.
 		 */
+		ACPI_ERROR((AE_INFO, "Executed External Op"));
 		status = AE_OK;
 		goto cleanup;
 
Signature · 1 line
1.7.10
author
#8 lore raw

PATCH 8/15 ACPICA: Tables: make default region accessible during the table load

In reply to Lv Zheng

ACPICA commit 016b2a0917cca9cf0d40c38a1541017d9cf569dd

It is proven that the default regions should be accessible during the table loading in order to execute module level AML code.
This patch moves default region handler installation code earlier in order to make this happen.
Note that by putting the code here, we actually allow OSPMs to override default region handlers between acpi_initialize_subsystem() and acpi_load_tables(), without the need to introduce region handler override mechanism in acpi_install_address_space_handler(). OSPMs are also couraged to check acpi_install_address_space_handler() return value to determine if acpi_remove_address_space_handler() should be invoked before installing new address space handler. Lv Zheng.

---
 drivers/acpi/acpica/tbxfload.c |   22 ++++++++++++++++++++++
 drivers/acpi/acpica/utxfinit.c |   12 +++++++-----
 2 files changed, 29 insertions(+), 5 deletions(-)
drivers/acpi/acpica/tbxfload.c +22 -0
index c89943b..9496b84 100644
@@ -47,6 +47,7 @@
 #include "accommon.h"
 #include "acnamesp.h"
 #include "actables.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbxfload")
@@ -68,6 +69,27 @@ acpi_status __init acpi_load_tables(void)
 
 	ACPI_FUNCTION_TRACE(acpi_load_tables);
 
+	/*
+	 * Install the default operation region handlers. These are the
+	 * handlers that are defined by the ACPI specification to be
+	 * "always accessible" -- namely, system_memory, system_IO, and
+	 * PCI_Config. This also means that no _REG methods need to be
+	 * run for these address spaces. We need to have these handlers
+	 * installed before any AML code can be executed, especially any
+	 * module-level code (11/2015).
+	 * Note that we allow OSPMs to install their own region handlers
+	 * between acpi_initialize_subsystem() and acpi_load_tables() to use
+	 * their customized default region handlers.
+	 */
+	if (acpi_gbl_group_module_level_code) {
+		status = acpi_ev_install_region_handlers();
+		if (ACPI_FAILURE(status) && status != AE_ALREADY_EXISTS) {
+			ACPI_EXCEPTION((AE_INFO, status,
+					"During Region initialization"));
+			return_ACPI_STATUS(status);
+		}
+	}
+
 	/* Load the namespace from the tables */
 
 	status = acpi_tb_load_namespace();
drivers/acpi/acpica/utxfinit.c +7 -5
index 721b87c..e1ffd7a 100644
@@ -163,11 +163,13 @@ acpi_status __init acpi_enable_subsystem(u32 flags)
 	 * installed before any AML code can be executed, especially any
 	 * module-level code (11/2015).
 	 */
-	status = acpi_ev_install_region_handlers();
-	if (ACPI_FAILURE(status)) {
-		ACPI_EXCEPTION((AE_INFO, status,
-				"During Region initialization"));
-		return_ACPI_STATUS(status);
+	if (!acpi_gbl_group_module_level_code) {
+		status = acpi_ev_install_region_handlers();
+		if (ACPI_FAILURE(status)) {
+			ACPI_EXCEPTION((AE_INFO, status,
+					"During Region initialization"));
+			return_ACPI_STATUS(status);
+		}
 	}
 #if (!ACPI_REDUCED_HARDWARE)
 
Signature · 1 line
1.7.10
author
#9 lore raw

PATCH 9/15 ACPICA: ACPICA: Tune _REG evaluations order in the initialization steps

In reply to Lv Zheng

ACPICA commit 77e0c7a482ac30ef857cf3c33d075e5fe5b5e449

This patch tunes _REG evaluations to be later than all table loading facilities:
1. acpi_load_tables(): _REG is currently invoked after this function.
2. acpi_ns_exec_module_code_list(): this executes module level code, the execution should be a part of the table loading while we currently support this in a deferred way.
3. acpi_ns_initialize_objects(): this parses Region/Field/Buffer/Package where pkg_length primitive can be seen in the grammar, the parsing should be a part of the table loading while we currently support this in a deferred way.
Control method evaluation should happen after loading the tables. So this patch changes the order of _REG evaluation when acpi_gbl_group_module_level_code experiment is enabled. Lv Zheng.

---
 drivers/acpi/acpica/utxfinit.c |   35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)
drivers/acpi/acpica/utxfinit.c +18 -17
index e1ffd7a..9415830 100644
@@ -262,23 +262,6 @@ acpi_status __init acpi_initialize_objects(u32 flags)
 
 	ACPI_FUNCTION_TRACE(acpi_initialize_objects);
 
-	/*
-	 * Run all _REG methods
-	 *
-	 * Note: Any objects accessed by the _REG methods will be automatically
-	 * initialized, even if they contain executable AML (see the call to
-	 * acpi_ns_initialize_objects below).
-	 */
-	acpi_gbl_reg_methods_enabled = TRUE;
-	if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-				  "[Init] Executing _REG OpRegion methods\n"));
-
-		status = acpi_ev_initialize_op_regions();
-		if (ACPI_FAILURE(status)) {
-			return_ACPI_STATUS(status);
-		}
-	}
 #ifdef ACPI_EXEC_APP
 	/*
 	 * This call implements the "initialization file" option for acpi_exec.
@@ -319,6 +302,24 @@ acpi_status __init acpi_initialize_objects(u32 flags)
 	}
 
 	/*
+	 * Run all _REG methods
+	 *
+	 * Note: Any objects accessed by the _REG methods will be automatically
+	 * initialized, even if they contain executable AML (see the call to
+	 * acpi_ns_initialize_objects below).
+	 */
+	acpi_gbl_reg_methods_enabled = TRUE;
+	if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) {
+		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
+				  "[Init] Executing _REG OpRegion methods\n"));
+
+		status = acpi_ev_initialize_op_regions();
+		if (ACPI_FAILURE(status)) {
+			return_ACPI_STATUS(status);
+		}
+	}
+
+	/*
 	 * Initialize all device objects in the namespace. This runs the device
 	 * _STA and _INI methods.
 	 */
Signature · 1 line
1.7.10
author
#10 lore raw

PATCH 10/15 ACPICA: Namespace: Ensure \_SB._INI executed before any _REG

In reply to Lv Zheng

ACPICA commit 8ae25b8d128b6b8509010be321ff6bf2760f3807

There is BIOS code relying on the fact that \_SB._INI should get evaluated before any other control methods. This may implies a gap in ACPICA/Linux initialization/enumeration process.

Before revealing Windows true behavior by more validations, this patch only ensures \_SB._INI evaluated before any _REG control methods. This can help to make progress to other initialization order fixes. Lv Zheng.

---
 drivers/acpi/acpica/acnamesp.h |    2 +-
 drivers/acpi/acpica/nsinit.c   |  133 ++++++++++++++++++++++++----------------
 drivers/acpi/acpica/utxfinit.c |   27 ++------
 3 files changed, 85 insertions(+), 77 deletions(-)
drivers/acpi/acpica/acnamesp.h +1 -1
index 9684ed6..022d69c 100644
@@ -88,7 +88,7 @@
  */
 acpi_status acpi_ns_initialize_objects(void);
 
-acpi_status acpi_ns_initialize_devices(void);
+acpi_status acpi_ns_initialize_devices(u32 flags);
 
 /*
  * nsload -  Namespace loading
drivers/acpi/acpica/nsinit.c +80 -53

168 lines not on this page · raw message

drivers/acpi/acpica/utxfinit.c +4 -23
index 9415830..66d6f19 100644
@@ -301,33 +301,14 @@ acpi_status __init acpi_initialize_objects(u32 flags)
 		}
 	}
 
-	/*
-	 * Run all _REG methods
-	 *
-	 * Note: Any objects accessed by the _REG methods will be automatically
-	 * initialized, even if they contain executable AML (see the call to
-	 * acpi_ns_initialize_objects below).
-	 */
 	acpi_gbl_reg_methods_enabled = TRUE;
-	if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-				  "[Init] Executing _REG OpRegion methods\n"));
-
-		status = acpi_ev_initialize_op_regions();
-		if (ACPI_FAILURE(status)) {
-			return_ACPI_STATUS(status);
-		}
-	}
 
 	/*
-	 * Initialize all device objects in the namespace. This runs the device
-	 * _STA and _INI methods.
+	 * Initialize all device/region objects in the namespace. This runs
+	 * the device _STA and _INI methods and region _REG methods.
 	 */
-	if (!(flags & ACPI_NO_DEVICE_INIT)) {
-		ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-				  "[Init] Initializing ACPI Devices\n"));
-
-		status = acpi_ns_initialize_devices();
+	if (!(flags & (ACPI_NO_DEVICE_INIT | ACPI_NO_ADDRESS_SPACE_INIT))) {
+		status = acpi_ns_initialize_devices(flags);
 		if (ACPI_FAILURE(status)) {
 			return_ACPI_STATUS(status);
 		}
Signature · 1 line
1.7.10
author
#11 lore raw

PATCH 11/15 ACPICA: Namespace: Rename acpi_gbl_reg_methods_enabled to acpi_gbl_namespace_initialized

In reply to Lv Zheng

ACPICA commit 4be3b82cf45d324366ea8567102d5108c5ef47cb ACPICA commit 19f84c249267fab0bfb138bd14d12510fb4faf24

The global variable actually means the availability of the namespace, and control methods evaluations should happen after namespace readiness. Thus this patch renames the global variable to reflect this logic. Lv Zheng.

---
 drivers/acpi/acpica/acglobal.h |    2 +-
 drivers/acpi/acpica/evregion.c |    2 +-
 drivers/acpi/acpica/nsinit.c   |    2 +-
 drivers/acpi/acpica/utxfinit.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/acpi/acpica/acglobal.h +1 -1
index 55c8197..51b073b 100644
@@ -165,7 +165,7 @@ ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);
 
 /* Initialization sequencing */
 
-ACPI_INIT_GLOBAL(u8, acpi_gbl_reg_methods_enabled, FALSE);
+ACPI_INIT_GLOBAL(u8, acpi_gbl_namespace_initialized, FALSE);
 
 /* Misc */
 
drivers/acpi/acpica/evregion.c +1 -1
index 47092b4..63924d1 100644
@@ -600,7 +600,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
 
 	if (region_obj2->extra.method_REG == NULL ||
 	    region_obj->region.handler == NULL ||
-	    !acpi_gbl_reg_methods_enabled) {
+	    !acpi_gbl_namespace_initialized) {
 		return_ACPI_STATUS(AE_OK);
 	}
 
drivers/acpi/acpica/nsinit.c +1 -1
index 3281dd8..f029a3d 100644
@@ -136,7 +136,7 @@ acpi_status acpi_ns_initialize_objects(void)
 
 acpi_status acpi_ns_initialize_devices(u32 flags)
 {
-	acpi_status status;
+	acpi_status status = AE_OK;
 	struct acpi_device_walk_info info;
 
 	ACPI_FUNCTION_TRACE(ns_initialize_devices);
drivers/acpi/acpica/utxfinit.c +1 -1
index 66d6f19..d70649d 100644
@@ -301,7 +301,7 @@ acpi_status __init acpi_initialize_objects(u32 flags)
 		}
 	}
 
-	acpi_gbl_reg_methods_enabled = TRUE;
+	acpi_gbl_namespace_initialized = TRUE;
 
 	/*
 	 * Initialize all device/region objects in the namespace. This runs
Signature · 1 line
1.7.10
author
#12 lore raw

PATCH 12/15 ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 5f21bddaa2cec035ca80608803ce2f0858d4f387

Small changes:
1) A couple new predefined names
2) New _HID values
3) New subtable for HEST

---
 drivers/acpi/acpica/acpredef.h |    9 +++++++++
 drivers/acpi/acpica/utdecode.c |   30 +++++++++++++++++-------------
 include/acpi/actbl.h           |    2 +-
 include/acpi/actbl1.h          |   29 ++++++++++++++++++++++++++---
 include/acpi/actypes.h         |    3 ++-
 5 files changed, 55 insertions(+), 18 deletions(-)
drivers/acpi/acpica/acpredef.h +9 -0
index 5faeab4..4ca426b 100644
@@ -523,6 +523,9 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
 
+	{{"_FIT", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},	/* ACPI 6.0 */
+
 	{{"_FIX", METHOD_0ARGS,
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints) */
 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
@@ -1053,6 +1056,12 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
 			 ACPI_RTYPE_BUFFER)}},
 
+	{{"_WPC", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
+	{{"_WPP", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
 };
 #else
drivers/acpi/acpica/utdecode.c +17 -13
index 6ba65b0..efd7988 100644
@@ -446,7 +446,7 @@ const char *acpi_ut_get_mutex_name(u32 mutex_id)
 
 /* Names for Notify() values, used for debug output */
 
-static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
+static const char *acpi_gbl_generic_notify[ACPI_GENERIC_NOTIFY_MAX + 1] = {
 	/* 00 */ "Bus Check",
 	/* 01 */ "Device Check",
 	/* 02 */ "Device Wake",
@@ -459,49 +459,53 @@ static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
 	/* 09 */ "Device PLD Check",
 	/* 0A */ "Reserved",
 	/* 0B */ "System Locality Update",
-	/* 0C */ "Shutdown Request",
+					/* 0C */ "Shutdown Request",
+					/* Reserved in ACPI 6.0 */
 	/* 0D */ "System Resource Affinity Update"
 };
 
-static const char *acpi_gbl_device_notify[4] = {
+static const char *acpi_gbl_device_notify[5] = {
 	/* 80 */ "Status Change",
 	/* 81 */ "Information Change",
 	/* 82 */ "Device-Specific Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Device-Specific Change",
+	/* 84 */ "Reserved"
 };
 
-static const char *acpi_gbl_processor_notify[4] = {
+static const char *acpi_gbl_processor_notify[5] = {
 	/* 80 */ "Performance Capability Change",
 	/* 81 */ "C-State Change",
 	/* 82 */ "Throttling Capability Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Guaranteed Change",
+	/* 84 */ "Minimum Excursion"
 };
 
-static const char *acpi_gbl_thermal_notify[4] = {
+static const char *acpi_gbl_thermal_notify[5] = {
 	/* 80 */ "Thermal Status Change",
 	/* 81 */ "Thermal Trip Point Change",
 	/* 82 */ "Thermal Device List Change",
-	/* 83 */ "Thermal Relationship Change"
+	/* 83 */ "Thermal Relationship Change",
+	/* 84 */ "Reserved"
 };
 
 const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type)
 {
 
-	/* 00 - 0D are common to all object types */
+	/* 00 - 0D are "common to all object types" (from ACPI Spec) */
 
-	if (notify_value <= ACPI_NOTIFY_MAX) {
+	if (notify_value <= ACPI_GENERIC_NOTIFY_MAX) {
 		return (acpi_gbl_generic_notify[notify_value]);
 	}
 
-	/* 0D - 7F are reserved */
+	/* 0E - 7F are reserved */
 
 	if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
 		return ("Reserved");
 	}
 
-	/* 80 - 83 are per-object-type */
+	/* 80 - 84 are per-object-type */
 
-	if (notify_value <= 0x83) {
+	if (notify_value <= ACPI_SPECIFIC_NOTIFY_MAX) {
 		switch (type) {
 		case ACPI_TYPE_ANY:
 		case ACPI_TYPE_DEVICE:
include/acpi/actbl.h +1 -1
index 0cb1a00..6a4e521 100644
@@ -223,7 +223,7 @@ struct acpi_table_facs {
 /*******************************************************************************
  *
  * FADT - Fixed ACPI Description Table (Signature "FACP")
- *        Version 4
+ *        Version 6
  *
  ******************************************************************************/
 
include/acpi/actbl1.h +26 -3
index 16e0136..26494dd 100644
@@ -236,7 +236,8 @@ enum acpi_einj_actions {
 	ACPI_EINJ_CHECK_BUSY_STATUS = 6,
 	ACPI_EINJ_GET_COMMAND_STATUS = 7,
 	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
-	ACPI_EINJ_ACTION_RESERVED = 9,	/* 9 and greater are reserved */
+	ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
+	ACPI_EINJ_ACTION_RESERVED = 10,	/* 10 and greater are reserved */
 	ACPI_EINJ_TRIGGER_ERROR = 0xFF	/* Except for this value */
 };
 
@@ -348,7 +349,8 @@ enum acpi_erst_actions {
 	ACPI_ERST_GET_ERROR_RANGE = 13,
 	ACPI_ERST_GET_ERROR_LENGTH = 14,
 	ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
-	ACPI_ERST_ACTION_RESERVED = 16	/* 16 and greater are reserved */
+	ACPI_ERST_EXECUTE_TIMINGS = 16,
+	ACPI_ERST_ACTION_RESERVED = 17	/* 17 and greater are reserved */
 };
 
 /* Values for Instruction field above */
@@ -427,7 +429,8 @@ enum acpi_hest_types {
 	ACPI_HEST_TYPE_AER_ENDPOINT = 7,
 	ACPI_HEST_TYPE_AER_BRIDGE = 8,
 	ACPI_HEST_TYPE_GENERIC_ERROR = 9,
-	ACPI_HEST_TYPE_RESERVED = 10	/* 10 and greater are reserved */
+	ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
+	ACPI_HEST_TYPE_RESERVED = 11	/* 11 and greater are reserved */
 };
 
 /*
@@ -603,6 +606,24 @@ struct acpi_hest_generic {
 	u32 error_block_length;
 };
 
+/* 10: Generic Hardware Error Source, version 2 */
+
+struct acpi_hest_generic_v2 {
+	struct acpi_hest_header header;
+	u16 related_source_id;
+	u8 reserved;
+	u8 enabled;
+	u32 records_to_preallocate;
+	u32 max_sections_per_record;
+	u32 max_raw_data_length;
+	struct acpi_generic_address error_status_address;
+	struct acpi_hest_notify notify;
+	u32 error_block_length;
+	struct acpi_generic_address read_ack_register;
+	u64 read_ack_preserve;
+	u64 read_ack_write;
+};
+
 /* Generic Error Status block */
 
 struct acpi_hest_generic_status {
@@ -632,6 +653,7 @@ struct acpi_hest_generic_data {
 	u32 error_data_length;
 	u8 fru_id[16];
 	u8 fru_text[20];
+	u64 time_stamp;
 };
 
 /*******************************************************************************
@@ -1015,6 +1037,7 @@ struct acpi_nfit_memory_map {
 #define ACPI_NFIT_MEM_NOT_ARMED         (1<<3)	/* 03: Memory Device is not armed */
 #define ACPI_NFIT_MEM_HEALTH_OBSERVED   (1<<4)	/* 04: Memory Device observed SMART/health events */
 #define ACPI_NFIT_MEM_HEALTH_ENABLED    (1<<5)	/* 05: SMART/health events enabled */
+#define ACPI_NFIT_MEM_MAP_FAILED        (1<<6)	/* 06: Mapping to SPA failed */
 
 /* 2: Interleave Structure */
 
include/acpi/actypes.h +2 -1
index db46546..140886e 100644
@@ -630,7 +630,8 @@ typedef u64 acpi_integer;
 #define ACPI_NOTIFY_SHUTDOWN_REQUEST    (u8) 0x0C
 #define ACPI_NOTIFY_AFFINITY_UPDATE     (u8) 0x0D
 
-#define ACPI_NOTIFY_MAX                 0x0D
+#define ACPI_GENERIC_NOTIFY_MAX         0x0D
+#define ACPI_SPECIFIC_NOTIFY_MAX        0x84
 
 /*
  * Types associated with ACPI names and objects. The first group of
Signature · 1 line
1.7.10
#13 lore raw

Re: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

Quoted 7 lines · Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 5f21bddaa2cec035ca80608803ce2f0858d4f387

Small changes:
1) A couple new predefined names
2) New _HID values

I don't see where you are adding new _HID values in this patch.

Quoted 192 lines

3) New subtable for HEST

---
 drivers/acpi/acpica/acpredef.h |    9 +++++++++
 drivers/acpi/acpica/utdecode.c |   30 +++++++++++++++++-------------
 include/acpi/actbl.h           |    2 +-
 include/acpi/actbl1.h          |   29 ++++++++++++++++++++++++++---
 include/acpi/actypes.h         |    3 ++-
 5 files changed, 55 insertions(+), 18 deletions(-)
drivers/acpi/acpica/acpredef.h +9 -0
index 5faeab4..4ca426b 100644
@@ -523,6 +523,9 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
 
+	{{"_FIT", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},	/* ACPI 6.0 */
+
 	{{"_FIX", METHOD_0ARGS,
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints) */
 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
@@ -1053,6 +1056,12 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
 			 ACPI_RTYPE_BUFFER)}},
 
+	{{"_WPC", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
+	{{"_WPP", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
 };
 #else
drivers/acpi/acpica/utdecode.c +17 -13
index 6ba65b0..efd7988 100644
@@ -446,7 +446,7 @@ const char *acpi_ut_get_mutex_name(u32 mutex_id)
 
 /* Names for Notify() values, used for debug output */
 
-static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
+static const char *acpi_gbl_generic_notify[ACPI_GENERIC_NOTIFY_MAX + 1] = {
 	/* 00 */ "Bus Check",
 	/* 01 */ "Device Check",
 	/* 02 */ "Device Wake",
@@ -459,49 +459,53 @@ static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
 	/* 09 */ "Device PLD Check",
 	/* 0A */ "Reserved",
 	/* 0B */ "System Locality Update",
-	/* 0C */ "Shutdown Request",
+					/* 0C */ "Shutdown Request",
+					/* Reserved in ACPI 6.0 */
 	/* 0D */ "System Resource Affinity Update"
 };
 
-static const char *acpi_gbl_device_notify[4] = {
+static const char *acpi_gbl_device_notify[5] = {
 	/* 80 */ "Status Change",
 	/* 81 */ "Information Change",
 	/* 82 */ "Device-Specific Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Device-Specific Change",
+	/* 84 */ "Reserved"
 };
 
-static const char *acpi_gbl_processor_notify[4] = {
+static const char *acpi_gbl_processor_notify[5] = {
 	/* 80 */ "Performance Capability Change",
 	/* 81 */ "C-State Change",
 	/* 82 */ "Throttling Capability Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Guaranteed Change",
+	/* 84 */ "Minimum Excursion"
 };
 
-static const char *acpi_gbl_thermal_notify[4] = {
+static const char *acpi_gbl_thermal_notify[5] = {
 	/* 80 */ "Thermal Status Change",
 	/* 81 */ "Thermal Trip Point Change",
 	/* 82 */ "Thermal Device List Change",
-	/* 83 */ "Thermal Relationship Change"
+	/* 83 */ "Thermal Relationship Change",
+	/* 84 */ "Reserved"
 };
 
 const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type)
 {
 
-	/* 00 - 0D are common to all object types */
+	/* 00 - 0D are "common to all object types" (from ACPI Spec) */
 
-	if (notify_value <= ACPI_NOTIFY_MAX) {
+	if (notify_value <= ACPI_GENERIC_NOTIFY_MAX) {
 		return (acpi_gbl_generic_notify[notify_value]);
 	}
 
-	/* 0D - 7F are reserved */
+	/* 0E - 7F are reserved */
 
 	if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
 		return ("Reserved");
 	}
 
-	/* 80 - 83 are per-object-type */
+	/* 80 - 84 are per-object-type */
 
-	if (notify_value <= 0x83) {
+	if (notify_value <= ACPI_SPECIFIC_NOTIFY_MAX) {
 		switch (type) {
 		case ACPI_TYPE_ANY:
 		case ACPI_TYPE_DEVICE:
include/acpi/actbl.h +1 -1
index 0cb1a00..6a4e521 100644
@@ -223,7 +223,7 @@ struct acpi_table_facs {
 /*******************************************************************************
  *
  * FADT - Fixed ACPI Description Table (Signature "FACP")
- *        Version 4
+ *        Version 6
  *
  ******************************************************************************/
 
include/acpi/actbl1.h +24 -3
index 16e0136..26494dd 100644
@@ -236,7 +236,8 @@ enum acpi_einj_actions {
 	ACPI_EINJ_CHECK_BUSY_STATUS = 6,
 	ACPI_EINJ_GET_COMMAND_STATUS = 7,
 	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
-	ACPI_EINJ_ACTION_RESERVED = 9,	/* 9 and greater are reserved */
+	ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
+	ACPI_EINJ_ACTION_RESERVED = 10,	/* 10 and greater are reserved */
 	ACPI_EINJ_TRIGGER_ERROR = 0xFF	/* Except for this value */
 };
 
@@ -348,7 +349,8 @@ enum acpi_erst_actions {
 	ACPI_ERST_GET_ERROR_RANGE = 13,
 	ACPI_ERST_GET_ERROR_LENGTH = 14,
 	ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
-	ACPI_ERST_ACTION_RESERVED = 16	/* 16 and greater are reserved */
+	ACPI_ERST_EXECUTE_TIMINGS = 16,
+	ACPI_ERST_ACTION_RESERVED = 17	/* 17 and greater are reserved */
 };
 
 /* Values for Instruction field above */
@@ -427,7 +429,8 @@ enum acpi_hest_types {
 	ACPI_HEST_TYPE_AER_ENDPOINT = 7,
 	ACPI_HEST_TYPE_AER_BRIDGE = 8,
 	ACPI_HEST_TYPE_GENERIC_ERROR = 9,
-	ACPI_HEST_TYPE_RESERVED = 10	/* 10 and greater are reserved */
+	ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
+	ACPI_HEST_TYPE_RESERVED = 11	/* 11 and greater are reserved */
 };
 
 /*
@@ -603,6 +606,24 @@ struct acpi_hest_generic {
 	u32 error_block_length;
 };
 
+/* 10: Generic Hardware Error Source, version 2 */
+
+struct acpi_hest_generic_v2 {
+	struct acpi_hest_header header;
+	u16 related_source_id;
+	u8 reserved;
+	u8 enabled;
+	u32 records_to_preallocate;
+	u32 max_sections_per_record;
+	u32 max_raw_data_length;
+	struct acpi_generic_address error_status_address;
+	struct acpi_hest_notify notify;
+	u32 error_block_length;
+	struct acpi_generic_address read_ack_register;
+	u64 read_ack_preserve;
+	u64 read_ack_write;
+};
+
 /* Generic Error Status block */
 
 struct acpi_hest_generic_status {

include/acpi/actbl1.h struct acpi_hest_generic_data { · line 657

Quoted 5 lines
include/acpi/actbl1.h +1 -0
@@ -632,6 +653,7 @@ struct acpi_hest_generic_data {
 	u32 error_data_length;
 	u8 fru_id[16];
 	u8 fru_text[20];
+	u64 time_stamp;
 };

There is quite a bit of overlap between this patch and our patch series
(https://lkml.org/lkml/2016/2/5/544)

There are few things I see missing in this patch in your updates made to actbl1.h, I list them below:

1) Adding time stamp as you did breaks backwards compatibility (something we discovered during our testing). We tried to remedy this by adding a new version of the acpi_hest_generic_data structure. Note that we named it v3 to reflect this was the updated version number in ACPI 6.1. (see https://lkml.org/lkml/2016/2/5/549)

2) Missing definition of generic error data validation bits, needed to determine whether or not field being read are valid or not (see
https://lkml.org/lkml/2016/2/5/549)

3) Need to extend acpi_hest_notify_types to add GPIO, SEA, SEI, and GSIV (see https://lkml.org/lkml/2016/2/5/545)

4) Also for the purpose of backwards compatibility, we needed to add both acpi_hest_generic and acpi_hest_generic_v2 to the structure "ghes", referencing the v2 pointer when needed. (https://lkml.org/lkml/2016/2/5/550)

Can you please review the above patch series patches for comparison, and if in agreement, can you please update this patch to better align with the changes we need? We can rework our patch series to depend on your patch series (i.e. leaving actbl1.h untouched on our side).

Quoted 16 lines
include/acpi/actbl1.h +1 -0
 /*******************************************************************************
@@ -1015,6 +1037,7 @@ struct acpi_nfit_memory_map {
 #define ACPI_NFIT_MEM_NOT_ARMED         (1<<3)	/* 03: Memory Device is not armed */
 #define ACPI_NFIT_MEM_HEALTH_OBSERVED   (1<<4)	/* 04: Memory Device observed SMART/health events */
 #define ACPI_NFIT_MEM_HEALTH_ENABLED    (1<<5)	/* 05: SMART/health events enabled */
+#define ACPI_NFIT_MEM_MAP_FAILED        (1<<6)	/* 06: Mapping to SPA failed */
 
 /* 2: Interleave Structure */
 
include/acpi/actypes.h +0 -0
index db46546..140886e 100644

include/acpi/actypes.h typedef u64 acpi_integer; · line 637

Quoted 9 lines
include/acpi/actypes.h +2 -1
@@ -630,7 +630,8 @@ typedef u64 acpi_integer;
 #define ACPI_NOTIFY_SHUTDOWN_REQUEST    (u8) 0x0C
 #define ACPI_NOTIFY_AFFINITY_UPDATE     (u8) 0x0D
 
-#define ACPI_NOTIFY_MAX                 0x0D
+#define ACPI_GENERIC_NOTIFY_MAX         0x0D
+#define ACPI_SPECIFIC_NOTIFY_MAX        0x84
 
 /*
  * Types associated with ACPI names and objects. The first group of

Harb

Signature · 4 lines
Qualcomm Technologies, Inc.
on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#14 lore raw

RE: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

Quoted 11 lines

-----Original Message-----
From: Abdulhamid, Harb [mailto:[email protected]]
Sent: Saturday, February 20, 2016 1:41 PM
To: Zheng, Lv; Wysocki, Rafael J; Rafael J. Wysocki; Brown, Len
Cc: Lv Zheng; [email protected]; [email protected]; Moore, Robert; Al Stone; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

On 2/19/2016 1:17 AM, Lv Zheng wrote:

Quoted 9 lines
Quoted 7 lines

From: Bob Moore <[email protected]>

ACPICA commit 5f21bddaa2cec035ca80608803ce2f0858d4f387

Small changes:
1) A couple new predefined names
2) New _HID values

I don't see where you are adding new _HID values in this patch.

Not everything in the patch actually makes it into the Linux kernel. The new _HID values are for the AcpiHelp tables, which in turn are also used by the disassembler.

Quoted 275 lines

drivers/acpi/acpica/acpredef.h const union acpi_predefined_info

Quoted 18 lines

3) New subtable for HEST

---
 drivers/acpi/acpica/acpredef.h |    9 +++++++++
 drivers/acpi/acpica/utdecode.c |   30 +++++++++++++++++-------------
 include/acpi/actbl.h           |    2 +-
 include/acpi/actbl1.h          |   29 ++++++++++++++++++++++++++---
 include/acpi/actypes.h         |    3 ++-
 5 files changed, 55 insertions(+), 18 deletions(-)
(quoted diff) +0 -0

b/drivers/acpi/acpica/acpredef.h index 5faeab4..4ca426b 100644

drivers/acpi/acpica/acpredef.h +0 -0
@@ -523,6 +523,9 @@ const union acpi_predefined_info

acpi_gbl_predefined_methods[] = {

drivers/acpi/acpica/acpredef.h const union acpi_predefined_info acpi_gbl_predefined_methods[] = {

Quoted 8 lines
drivers/acpi/acpica/acpredef.h +3 -0
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
 
+	{{"_FIT", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},	/* ACPI 6.0 */
+
 	{{"_FIX", METHOD_0ARGS,
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints)

*/

drivers/acpi/acpica/acpredef.h const union acpi_predefined_info

Quoted 2 lines
drivers/acpi/acpica/acpredef.h +0 -1
 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0), @@
-1053,6 +1056,12 @@ const union acpi_predefined_info

acpi_gbl_predefined_methods[] = {

drivers/acpi/acpica/utdecode.c static const char

Quoted 27 lines
drivers/acpi/acpica/acpredef.h +6 -0
 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
 			 ACPI_RTYPE_BUFFER)}},
 
+	{{"_WPC", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
+	{{"_WPP", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
 };
 #else
(quoted diff) +0 -0

b/drivers/acpi/acpica/utdecode.c index 6ba65b0..efd7988 100644

drivers/acpi/acpica/utdecode.c +2 -1
@@ -446,7 +446,7 @@ const char *acpi_ut_get_mutex_name(u32 mutex_id)
 
 /* Names for Notify() values, used for debug output */
 
-static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
+static const char *acpi_gbl_generic_notify[ACPI_GENERIC_NOTIFY_MAX +
+1] = {
 	/* 00 */ "Bus Check",
 	/* 01 */ "Device Check",
 	/* 02 */ "Device Wake",
@@ -459,49 +459,53 @@ static const char

*acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {

Quoted 70 lines
drivers/acpi/acpica/utdecode.c +16 -12
 	/* 09 */ "Device PLD Check",
 	/* 0A */ "Reserved",
 	/* 0B */ "System Locality Update",
-	/* 0C */ "Shutdown Request",
+					/* 0C */ "Shutdown Request",
+					/* Reserved in ACPI 6.0 */
 	/* 0D */ "System Resource Affinity Update"
 };
 
-static const char *acpi_gbl_device_notify[4] = {
+static const char *acpi_gbl_device_notify[5] = {
 	/* 80 */ "Status Change",
 	/* 81 */ "Information Change",
 	/* 82 */ "Device-Specific Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Device-Specific Change",
+	/* 84 */ "Reserved"
 };
 
-static const char *acpi_gbl_processor_notify[4] = {
+static const char *acpi_gbl_processor_notify[5] = {
 	/* 80 */ "Performance Capability Change",
 	/* 81 */ "C-State Change",
 	/* 82 */ "Throttling Capability Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Guaranteed Change",
+	/* 84 */ "Minimum Excursion"
 };
 
-static const char *acpi_gbl_thermal_notify[4] = {
+static const char *acpi_gbl_thermal_notify[5] = {
 	/* 80 */ "Thermal Status Change",
 	/* 81 */ "Thermal Trip Point Change",
 	/* 82 */ "Thermal Device List Change",
-	/* 83 */ "Thermal Relationship Change"
+	/* 83 */ "Thermal Relationship Change",
+	/* 84 */ "Reserved"
 };
 
 const char *acpi_ut_get_notify_name(u32 notify_value,
 acpi_object_type type)  {
 
-	/* 00 - 0D are common to all object types */
+	/* 00 - 0D are "common to all object types" (from ACPI Spec) */
 
-	if (notify_value <= ACPI_NOTIFY_MAX) {
+	if (notify_value <= ACPI_GENERIC_NOTIFY_MAX) {
 		return (acpi_gbl_generic_notify[notify_value]);
 	}
 
-	/* 0D - 7F are reserved */
+	/* 0E - 7F are reserved */
 
 	if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
 		return ("Reserved");
 	}
 
-	/* 80 - 83 are per-object-type */
+	/* 80 - 84 are per-object-type */
 
-	if (notify_value <= 0x83) {
+	if (notify_value <= ACPI_SPECIFIC_NOTIFY_MAX) {
 		switch (type) {
 		case ACPI_TYPE_ANY:
 		case ACPI_TYPE_DEVICE:
include/acpi/actbl.h index renamed from include/acpi/actbl.h +0 -0

0cb1a00..6a4e521 100644

include/acpi/actbl.h struct acpi_table_facs { · line 223

Quoted 1 line
include/acpi/actbl.h +0 -0
@@ -223,7 +223,7 @@ struct acpi_table_facs {
 

/*************************************************************************
******

Quoted 14 lines
include/acpi/actbl.h +1 -1
  *
  * FADT - Fixed ACPI Description Table (Signature "FACP")
- *        Version 4
+ *        Version 6
  *
 
 **********************************************************************

********/

include/acpi/actbl1.h index renamed from include/acpi/actbl1.h +0 -0

16e0136..26494dd 100644

include/acpi/actbl1.h enum acpi_einj_actions { · line 240

Quoted 6 lines
include/acpi/actbl1.h +2 -1
@@ -236,7 +236,8 @@ enum acpi_einj_actions {
 	ACPI_EINJ_CHECK_BUSY_STATUS = 6,
 	ACPI_EINJ_GET_COMMAND_STATUS = 7,
 	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
-	ACPI_EINJ_ACTION_RESERVED = 9,	/* 9 and greater are reserved */
+	ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
+	ACPI_EINJ_ACTION_RESERVED = 10,	/* 10 and greater are reserved

*/

include/acpi/actbl1.h enum acpi_erst_actions { · line 351

Quoted 8 lines
include/acpi/actbl1.h +0 -1
 	ACPI_EINJ_TRIGGER_ERROR = 0xFF	/* Except for this value */
 };
 
@@ -348,7 +349,8 @@ enum acpi_erst_actions {
 	ACPI_ERST_GET_ERROR_RANGE = 13,
 	ACPI_ERST_GET_ERROR_LENGTH = 14,
 	ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
-	ACPI_ERST_ACTION_RESERVED = 16	/* 16 and greater are reserved

*/

include/acpi/actbl1.h enum acpi_erst_actions { · line 353

Quoted 2 lines
include/acpi/actbl1.h +2 -0
+	ACPI_ERST_EXECUTE_TIMINGS = 16,
+	ACPI_ERST_ACTION_RESERVED = 17	/* 17 and greater are reserved

*/

Quoted 39 lines
include/acpi/actbl1.h +0 -0
 };
 
 /* Values for Instruction field above */ @@ -427,7 +429,8 @@ enum

acpi_hest_types {

include/acpi/actbl1.h +20 -1
 	ACPI_HEST_TYPE_AER_ENDPOINT = 7,
 	ACPI_HEST_TYPE_AER_BRIDGE = 8,
 	ACPI_HEST_TYPE_GENERIC_ERROR = 9,
-	ACPI_HEST_TYPE_RESERVED = 10	/* 10 and greater are reserved */
+	ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
+	ACPI_HEST_TYPE_RESERVED = 11	/* 11 and greater are reserved */
 };
 
 /*
@@ -603,6 +606,24 @@ struct acpi_hest_generic {
 	u32 error_block_length;
 };
 
+/* 10: Generic Hardware Error Source, version 2 */
+
+struct acpi_hest_generic_v2 {
+	struct acpi_hest_header header;
+	u16 related_source_id;
+	u8 reserved;
+	u8 enabled;
+	u32 records_to_preallocate;
+	u32 max_sections_per_record;
+	u32 max_raw_data_length;
+	struct acpi_generic_address error_status_address;
+	struct acpi_hest_notify notify;
+	u32 error_block_length;
+	struct acpi_generic_address read_ack_register;
+	u64 read_ack_preserve;
+	u64 read_ack_write;
+};
+
 /* Generic Error Status block */
 
 struct acpi_hest_generic_status {

include/acpi/actbl1.h struct acpi_hest_generic_data { · line 657

Quoted 5 lines
include/acpi/actbl1.h +1 -0
@@ -632,6 +653,7 @@ struct acpi_hest_generic_data {
 	u32 error_data_length;
 	u8 fru_id[16];
 	u8 fru_text[20];
+	u64 time_stamp;
 };

There is quite a bit of overlap between this patch and our patch series
(https://lkml.org/lkml/2016/2/5/544)

There are few things I see missing in this patch in your updates made to actbl1.h, I list them below:

1) Adding time stamp as you did breaks backwards compatibility (something we discovered during our testing). We tried to remedy this by adding a new version of the acpi_hest_generic_data structure. Note that we named it v3 to reflect this was the updated version number in ACPI 6.1. (see
https://lkml.org/lkml/2016/2/5/549)

2) Missing definition of generic error data validation bits, needed to determine whether or not field being read are valid or not (see
https://lkml.org/lkml/2016/2/5/549)

3) Need to extend acpi_hest_notify_types to add GPIO, SEA, SEI, and GSIV (see https://lkml.org/lkml/2016/2/5/545)

4) Also for the purpose of backwards compatibility, we needed to add both acpi_hest_generic and acpi_hest_generic_v2 to the structure "ghes", referencing the v2 pointer when needed.
(https://lkml.org/lkml/2016/2/5/550)

Can you please review the above patch series patches for comparison, and if in agreement, can you please update this patch to better align with the changes we need? We can rework our patch series to depend on your patch series (i.e. leaving actbl1.h untouched on our side).

Quoted 5 lines
include/acpi/actbl1.h +0 -0
 /*********************************************************************
 ********** @@ -1015,6 +1037,7 @@ struct acpi_nfit_memory_map {

#define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device

is not armed */

Quoted 1 line

#define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device

observed SMART/health events */

Quoted 1 line

#define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health

events enabled */

Quoted 1 line

+#define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to

SPA failed */

Quoted 9 lines

/* 2: Interleave Structure */

include/acpi/actypes.h index renamed from include/acpi/actypes.h +0 -0

db46546..140886e 100644

include/acpi/actypes.h typedef u64 acpi_integer; · line 637

Quoted 9 lines
include/acpi/actypes.h +2 -1
@@ -630,7 +630,8 @@ typedef u64 acpi_integer;
 #define ACPI_NOTIFY_SHUTDOWN_REQUEST    (u8) 0x0C
 #define ACPI_NOTIFY_AFFINITY_UPDATE     (u8) 0x0D
 
-#define ACPI_NOTIFY_MAX                 0x0D
+#define ACPI_GENERIC_NOTIFY_MAX         0x0D
+#define ACPI_SPECIFIC_NOTIFY_MAX        0x84
 
 /*
  * Types associated with ACPI names and objects. The first group of

Harb
--
Qualcomm Technologies, Inc.
on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

#15 lore raw

RE: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

In reply to Abdulhamid, Harb

Yes, looks like we missed the revision update for the generic update.

We will update the actbl1.h file

Thanks,
Bob

Quoted 295 lines

-----Original Message-----
From: Abdulhamid, Harb [mailto:[email protected]]
Sent: Saturday, February 20, 2016 1:41 PM
To: Zheng, Lv; Wysocki, Rafael J; Rafael J. Wysocki; Brown, Len
Cc: Lv Zheng; [email protected]; [email protected]; Moore, Robert; Al Stone; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

Quoted 7 lines · Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 5f21bddaa2cec035ca80608803ce2f0858d4f387

Small changes:
1) A couple new predefined names
2) New _HID values

I don't see where you are adding new _HID values in this patch.

drivers/acpi/acpica/acpredef.h const union acpi_predefined_info

Quoted 18 lines

3) New subtable for HEST

---
 drivers/acpi/acpica/acpredef.h |    9 +++++++++
 drivers/acpi/acpica/utdecode.c |   30 +++++++++++++++++-------------
 include/acpi/actbl.h           |    2 +-
 include/acpi/actbl1.h          |   29 ++++++++++++++++++++++++++---
 include/acpi/actypes.h         |    3 ++-
 5 files changed, 55 insertions(+), 18 deletions(-)
(quoted diff) +0 -0

b/drivers/acpi/acpica/acpredef.h index 5faeab4..4ca426b 100644

drivers/acpi/acpica/acpredef.h +0 -0
@@ -523,6 +523,9 @@ const union acpi_predefined_info

acpi_gbl_predefined_methods[] = {

drivers/acpi/acpica/acpredef.h const union acpi_predefined_info acpi_gbl_predefined_methods[] = {

Quoted 8 lines
drivers/acpi/acpica/acpredef.h +3 -0
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
 
+	{{"_FIT", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},	/* ACPI 6.0 */
+
 	{{"_FIX", METHOD_0ARGS,
 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints)

*/

drivers/acpi/acpica/acpredef.h const union acpi_predefined_info

Quoted 2 lines
drivers/acpi/acpica/acpredef.h +0 -1
 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0), @@
-1053,6 +1056,12 @@ const union acpi_predefined_info

acpi_gbl_predefined_methods[] = {

drivers/acpi/acpica/utdecode.c static const char

Quoted 27 lines
drivers/acpi/acpica/acpredef.h +6 -0
 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
 			 ACPI_RTYPE_BUFFER)}},
 
+	{{"_WPC", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
+	{{"_WPP", METHOD_0ARGS,
+	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
+
 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
 };
 #else
(quoted diff) +0 -0

b/drivers/acpi/acpica/utdecode.c index 6ba65b0..efd7988 100644

drivers/acpi/acpica/utdecode.c +2 -1
@@ -446,7 +446,7 @@ const char *acpi_ut_get_mutex_name(u32 mutex_id)
 
 /* Names for Notify() values, used for debug output */
 
-static const char *acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {
+static const char *acpi_gbl_generic_notify[ACPI_GENERIC_NOTIFY_MAX +
+1] = {
 	/* 00 */ "Bus Check",
 	/* 01 */ "Device Check",
 	/* 02 */ "Device Wake",
@@ -459,49 +459,53 @@ static const char

*acpi_gbl_generic_notify[ACPI_NOTIFY_MAX + 1] = {

Quoted 70 lines
drivers/acpi/acpica/utdecode.c +16 -12
 	/* 09 */ "Device PLD Check",
 	/* 0A */ "Reserved",
 	/* 0B */ "System Locality Update",
-	/* 0C */ "Shutdown Request",
+					/* 0C */ "Shutdown Request",
+					/* Reserved in ACPI 6.0 */
 	/* 0D */ "System Resource Affinity Update"
 };
 
-static const char *acpi_gbl_device_notify[4] = {
+static const char *acpi_gbl_device_notify[5] = {
 	/* 80 */ "Status Change",
 	/* 81 */ "Information Change",
 	/* 82 */ "Device-Specific Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Device-Specific Change",
+	/* 84 */ "Reserved"
 };
 
-static const char *acpi_gbl_processor_notify[4] = {
+static const char *acpi_gbl_processor_notify[5] = {
 	/* 80 */ "Performance Capability Change",
 	/* 81 */ "C-State Change",
 	/* 82 */ "Throttling Capability Change",
-	/* 83 */ "Device-Specific Change"
+	/* 83 */ "Guaranteed Change",
+	/* 84 */ "Minimum Excursion"
 };
 
-static const char *acpi_gbl_thermal_notify[4] = {
+static const char *acpi_gbl_thermal_notify[5] = {
 	/* 80 */ "Thermal Status Change",
 	/* 81 */ "Thermal Trip Point Change",
 	/* 82 */ "Thermal Device List Change",
-	/* 83 */ "Thermal Relationship Change"
+	/* 83 */ "Thermal Relationship Change",
+	/* 84 */ "Reserved"
 };
 
 const char *acpi_ut_get_notify_name(u32 notify_value,
 acpi_object_type type)  {
 
-	/* 00 - 0D are common to all object types */
+	/* 00 - 0D are "common to all object types" (from ACPI Spec) */
 
-	if (notify_value <= ACPI_NOTIFY_MAX) {
+	if (notify_value <= ACPI_GENERIC_NOTIFY_MAX) {
 		return (acpi_gbl_generic_notify[notify_value]);
 	}
 
-	/* 0D - 7F are reserved */
+	/* 0E - 7F are reserved */
 
 	if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
 		return ("Reserved");
 	}
 
-	/* 80 - 83 are per-object-type */
+	/* 80 - 84 are per-object-type */
 
-	if (notify_value <= 0x83) {
+	if (notify_value <= ACPI_SPECIFIC_NOTIFY_MAX) {
 		switch (type) {
 		case ACPI_TYPE_ANY:
 		case ACPI_TYPE_DEVICE:
include/acpi/actbl.h index renamed from include/acpi/actbl.h +0 -0

0cb1a00..6a4e521 100644

include/acpi/actbl.h struct acpi_table_facs { · line 223

Quoted 1 line
include/acpi/actbl.h +0 -0
@@ -223,7 +223,7 @@ struct acpi_table_facs {
 

/*************************************************************************
******

Quoted 14 lines
include/acpi/actbl.h +1 -1
  *
  * FADT - Fixed ACPI Description Table (Signature "FACP")
- *        Version 4
+ *        Version 6
  *
 
 **********************************************************************

********/

include/acpi/actbl1.h index renamed from include/acpi/actbl1.h +0 -0

16e0136..26494dd 100644

include/acpi/actbl1.h enum acpi_einj_actions { · line 240

Quoted 6 lines
include/acpi/actbl1.h +2 -1
@@ -236,7 +236,8 @@ enum acpi_einj_actions {
 	ACPI_EINJ_CHECK_BUSY_STATUS = 6,
 	ACPI_EINJ_GET_COMMAND_STATUS = 7,
 	ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8,
-	ACPI_EINJ_ACTION_RESERVED = 9,	/* 9 and greater are reserved */
+	ACPI_EINJ_GET_EXECUTE_TIMINGS = 9,
+	ACPI_EINJ_ACTION_RESERVED = 10,	/* 10 and greater are reserved

*/

include/acpi/actbl1.h enum acpi_erst_actions { · line 351

Quoted 8 lines
include/acpi/actbl1.h +0 -1
 	ACPI_EINJ_TRIGGER_ERROR = 0xFF	/* Except for this value */
 };
 
@@ -348,7 +349,8 @@ enum acpi_erst_actions {
 	ACPI_ERST_GET_ERROR_RANGE = 13,
 	ACPI_ERST_GET_ERROR_LENGTH = 14,
 	ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
-	ACPI_ERST_ACTION_RESERVED = 16	/* 16 and greater are reserved

*/

include/acpi/actbl1.h enum acpi_erst_actions { · line 353

Quoted 2 lines
include/acpi/actbl1.h +2 -0
+	ACPI_ERST_EXECUTE_TIMINGS = 16,
+	ACPI_ERST_ACTION_RESERVED = 17	/* 17 and greater are reserved

*/

Quoted 39 lines
include/acpi/actbl1.h +0 -0
 };
 
 /* Values for Instruction field above */ @@ -427,7 +429,8 @@ enum

acpi_hest_types {

include/acpi/actbl1.h +20 -1
 	ACPI_HEST_TYPE_AER_ENDPOINT = 7,
 	ACPI_HEST_TYPE_AER_BRIDGE = 8,
 	ACPI_HEST_TYPE_GENERIC_ERROR = 9,
-	ACPI_HEST_TYPE_RESERVED = 10	/* 10 and greater are reserved */
+	ACPI_HEST_TYPE_GENERIC_ERROR_V2 = 10,
+	ACPI_HEST_TYPE_RESERVED = 11	/* 11 and greater are reserved */
 };
 
 /*
@@ -603,6 +606,24 @@ struct acpi_hest_generic {
 	u32 error_block_length;
 };
 
+/* 10: Generic Hardware Error Source, version 2 */
+
+struct acpi_hest_generic_v2 {
+	struct acpi_hest_header header;
+	u16 related_source_id;
+	u8 reserved;
+	u8 enabled;
+	u32 records_to_preallocate;
+	u32 max_sections_per_record;
+	u32 max_raw_data_length;
+	struct acpi_generic_address error_status_address;
+	struct acpi_hest_notify notify;
+	u32 error_block_length;
+	struct acpi_generic_address read_ack_register;
+	u64 read_ack_preserve;
+	u64 read_ack_write;
+};
+
 /* Generic Error Status block */
 
 struct acpi_hest_generic_status {

include/acpi/actbl1.h struct acpi_hest_generic_data { · line 657

Quoted 5 lines
include/acpi/actbl1.h +1 -0
@@ -632,6 +653,7 @@ struct acpi_hest_generic_data {
 	u32 error_data_length;
 	u8 fru_id[16];
 	u8 fru_text[20];
+	u64 time_stamp;
 };

There is quite a bit of overlap between this patch and our patch series
(https://lkml.org/lkml/2016/2/5/544)

There are few things I see missing in this patch in your updates made to actbl1.h, I list them below:

1) Adding time stamp as you did breaks backwards compatibility (something we discovered during our testing). We tried to remedy this by adding a new version of the acpi_hest_generic_data structure. Note that we named it v3 to reflect this was the updated version number in ACPI 6.1. (see
https://lkml.org/lkml/2016/2/5/549)

2) Missing definition of generic error data validation bits, needed to determine whether or not field being read are valid or not (see
https://lkml.org/lkml/2016/2/5/549)

3) Need to extend acpi_hest_notify_types to add GPIO, SEA, SEI, and GSIV (see https://lkml.org/lkml/2016/2/5/545)

4) Also for the purpose of backwards compatibility, we needed to add both acpi_hest_generic and acpi_hest_generic_v2 to the structure "ghes", referencing the v2 pointer when needed.
(https://lkml.org/lkml/2016/2/5/550)

Can you please review the above patch series patches for comparison, and if in agreement, can you please update this patch to better align with the changes we need? We can rework our patch series to depend on your patch series (i.e. leaving actbl1.h untouched on our side).

Quoted 5 lines
include/acpi/actbl1.h +0 -0
 /*********************************************************************
 ********** @@ -1015,6 +1037,7 @@ struct acpi_nfit_memory_map {

#define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device

is not armed */

Quoted 1 line

#define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device

observed SMART/health events */

Quoted 1 line

#define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health

events enabled */

Quoted 1 line

+#define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to

SPA failed */

Quoted 9 lines

/* 2: Interleave Structure */

include/acpi/actypes.h index renamed from include/acpi/actypes.h +0 -0

db46546..140886e 100644

include/acpi/actypes.h typedef u64 acpi_integer; · line 637

Quoted 9 lines
include/acpi/actypes.h +2 -1
@@ -630,7 +630,8 @@ typedef u64 acpi_integer;
 #define ACPI_NOTIFY_SHUTDOWN_REQUEST    (u8) 0x0C
 #define ACPI_NOTIFY_AFFINITY_UPDATE     (u8) 0x0D
 
-#define ACPI_NOTIFY_MAX                 0x0D
+#define ACPI_GENERIC_NOTIFY_MAX         0x0D
+#define ACPI_SPECIFIC_NOTIFY_MAX        0x84
 
 /*
  * Types associated with ACPI names and objects. The first group of

Harb
--
Qualcomm Technologies, Inc.
on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

#16 lore raw

RE: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

In reply to Abdulhamid, Harb
Quoted 10 lines

There are few things I see missing in this patch in your updates made to actbl1.h, I list them below:

1) Adding time stamp as you did breaks backwards compatibility (something we discovered during our testing). We tried to remedy this by adding a new version of the acpi_hest_generic_data structure. Note that we named it v3 to reflect this was the updated version number in ACPI 6.1. (see
https://lkml.org/lkml/2016/2/5/549)

I used V300 in case there is ever some other 3xx version.

Plus, I made a full struct for the V300 case.

Quoted 4 lines

2) Missing definition of generic error data validation bits, needed to determine whether or not field being read are valid or not (see
https://lkml.org/lkml/2016/2/5/549)

Done.

Quoted 3 lines

3) Need to extend acpi_hest_notify_types to add GPIO, SEA, SEI, and GSIV (see https://lkml.org/lkml/2016/2/5/545)

Done.

Quoted 5 lines

4) Also for the purpose of backwards compatibility, we needed to add both acpi_hest_generic and acpi_hest_generic_v2 to the structure "ghes", referencing the v2 pointer when needed.
(https://lkml.org/lkml/2016/2/5/550)

This doesn't affect the ACPICA code (actbl1.h), I don't think.

Quoted 43 lines

Can you please review the above patch series patches for comparison, and if in agreement, can you please update this patch to better align with the changes we need? We can rework our patch series to depend on your patch series (i.e. leaving actbl1.h untouched on our side).

Quoted 5 lines

/********************************************************************* ********** @@ -1015,6 +1037,7 @@ struct acpi_nfit_memory_map {
#define ACPI_NFIT_MEM_NOT_ARMED (1<<3) /* 03: Memory Device

is not armed */

Quoted 1 line

#define ACPI_NFIT_MEM_HEALTH_OBSERVED (1<<4) /* 04: Memory Device

observed SMART/health events */

Quoted 1 line

#define ACPI_NFIT_MEM_HEALTH_ENABLED (1<<5) /* 05: SMART/health

events enabled */

Quoted 1 line

+#define ACPI_NFIT_MEM_MAP_FAILED (1<<6) /* 06: Mapping to

SPA failed */

Quoted 9 lines

/* 2: Interleave Structure */

include/acpi/actypes.h index renamed from include/acpi/actypes.h +0 -0

db46546..140886e 100644

include/acpi/actypes.h typedef u64 acpi_integer; · line 637

Quoted 9 lines
include/acpi/actypes.h +2 -1
@@ -630,7 +630,8 @@ typedef u64 acpi_integer;
 #define ACPI_NOTIFY_SHUTDOWN_REQUEST    (u8) 0x0C
 #define ACPI_NOTIFY_AFFINITY_UPDATE     (u8) 0x0D
 
-#define ACPI_NOTIFY_MAX                 0x0D
+#define ACPI_GENERIC_NOTIFY_MAX         0x0D
+#define ACPI_SPECIFIC_NOTIFY_MAX        0x84
 
 /*
  * Types associated with ACPI names and objects. The first group of

Harb
--
Qualcomm Technologies, Inc.
on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

#17 lore raw

Re: [PATCH 12/15] ACPICA: ACPI 6.1: Add full support for this version of ACPI spec

Hi Bob,

Quoted 19 lines · Robert
Quoted 9 lines

There are few things I see missing in this patch in your updates made to actbl1.h, I list them below:

1) Adding time stamp as you did breaks backwards compatibility (something we discovered during our testing). We tried to remedy this by adding a new version of the acpi_hest_generic_data structure. Note that we named it v3 to reflect this was the updated version number in ACPI 6.1. (see
https://lkml.org/lkml/2016/2/5/549)

I used V300 in case there is ever some other 3xx version.

Plus, I made a full struct for the V300 case.

Quoted 4 lines

2) Missing definition of generic error data validation bits, needed to determine whether or not field being read are valid or not (see
https://lkml.org/lkml/2016/2/5/549)

Quoted 7 lines

Done.

Quoted 3 lines

3) Need to extend acpi_hest_notify_types to add GPIO, SEA, SEI, and GSIV (see https://lkml.org/lkml/2016/2/5/545)

Done.

OK

Should I expect an update of the $subject patch, then, or will there be a new patch on top of it?

Thanks,
Rafael

author
#18 lore raw

PATCH 13/15 ACPICA: Revert "Parser: Fix for SuperName method invocation"

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit eade8f78f2aa21e8eabc3380a5728db47273bcf1

This reverts commit 4b86d1046d06e462dae83ebcd5a66cc132a08f8f.

Support for method invocations as part of super_name will be removed from the ACPI specification, since no AML interpreter supports it.

---
 drivers/acpi/acpica/psargs.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/acpi/acpica/psargs.c +4 -5
index 3052185..d48cbed 100644
@@ -269,8 +269,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
 	 */
 	if (ACPI_SUCCESS(status) &&
 	    possible_method_call && (node->type == ACPI_TYPE_METHOD)) {
-		if (GET_CURRENT_ARG_TYPE(walk_state->arg_types) ==
-		    ARGP_SUPERNAME) {
+		if (walk_state->opcode == AML_UNLOAD_OP) {
 			/*
 			 * acpi_ps_get_next_namestring has increased the AML pointer,
 			 * so we need to restore the saved AML pointer for method call.
@@ -697,7 +696,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
  *
  * PARAMETERS:  walk_state          - Current state
  *              parser_state        - Current parser state object
- *              arg_type            - The parser argument type (ARGP_*)
+ *              arg_type            - The argument type (AML_*_ARG)
  *              return_arg          - Where the next arg is returned
  *
  * RETURN:      Status, and an op object containing the next argument.
@@ -817,9 +816,9 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
 				return_ACPI_STATUS(AE_NO_MEMORY);
 			}
 
-			/* super_name allows argument to be a method call */
+			/* To support super_name arg of Unload */
 
-			if (arg_type == ARGP_SUPERNAME) {
+			if (walk_state->opcode == AML_UNLOAD_OP) {
 				status =
 				    acpi_ps_get_next_namepath(walk_state,
 							      parser_state, arg,
Signature · 1 line
1.7.10
author
#19 lore raw

PATCH 14/15 ACPICA: Utilities: Update trace mechinism for acquire_object

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 0824ab90e03c2e4239e890615f447e7962b1daa2

Was not using the correct macro. Updated a comment in acoutput.h

---
 drivers/acpi/acpica/utcache.c |    2 +-
 include/acpi/acoutput.h       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/acpica/utcache.c +1 -1
index c9a720f..f8e9978 100644
@@ -245,7 +245,7 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
 	acpi_status status;
 	void *object;
 
-	ACPI_FUNCTION_NAME(os_acquire_object);
+	ACPI_FUNCTION_TRACE(os_acquire_object);
 
 	if (!cache) {
 		return_PTR(NULL);
include/acpi/acoutput.h +1 -1
index 5bfc619..34f601e 100644
@@ -262,7 +262,7 @@
 #define ACPI_GET_FUNCTION_NAME          _acpi_function_name
 
 /*
- * The Name parameter should be the procedure name as a quoted string.
+ * The Name parameter should be the procedure name as a non-quoted string.
  * The function name is also used by the function exit macros below.
  * Note: (const char) is used to be compatible with the debug interfaces
  * and macros such as __func__.
Signature · 1 line
1.7.10
author
#20 lore raw

PATCH 15/15 ACPICA: Update version to 20160212

In reply to Lv Zheng

From: Bob Moore <[email protected]>

ACPICA commit 6b06645ea778cc054f48b03dd1842260a1606532

Version 20160212

---
 include/acpi/acpixf.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
index 1755697..c5078aa 100644
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20160108
+#define ACPI_CA_VERSION                 0x20160212
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
Signature · 1 line
1.7.10