Skip to contentSkip to conversation

ACPICA release 20200214

PATCH In review Erik Kaneda 2 participants 12 messages Feb 14, 2020 – Feb 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ACPICA release 20200214

This patch series contains the 20200214 release of ACPICA. For linux, this a relatively small release. Major changes include Enabling the sleep button on ACPI legacy wake. Aside from that, this release mainly consists of changes in the converter, type casts to suppress compiler warnings when building in 64 bit mode on msvc 2019, and updates to comments.

This patch set is also available for viewing at the following link:

Anchal Agarwal (1):
ACPICA: Enable sleep button on ACPI legacy wake

Bob Moore (4):
ACPICA: Fix a comment "enable" fixed events -> "disable" all fixed
events.
ACPICA: Table Manager: Update comments in a function header
ACPICA: Fix a couple of typos
ACPICA: Update version to 20200214 Version 20200214.

Erik Kaneda (2):
ACPICA: ASL-ASL+ converter: remove function parameters from
cv_init_file_tree ()
ACPICA: ASL-ASL+ converter: make root file a parameter for
cv_init_file_tree

Sven Barth (3):
ACPICA: cast the result of the pointer difference to u32
ACPICA: cast length arguement to acpi_ns_build_normalized_path() as

    u32

ACPICA: use acpi_size instead of u32 for prefix_path_length

 drivers/acpi/acpica/acconvert.h |  4 +---
 drivers/acpi/acpica/acmacros.h  |  4 ++--
 drivers/acpi/acpica/evevent.c   |  2 +-
 drivers/acpi/acpica/hwsleep.c   | 12 ++++++++++++
 drivers/acpi/acpica/nsnames.c   |  6 +++---
 drivers/acpi/acpica/nsxfname.c  |  2 +-
 drivers/acpi/acpica/tbxface.c   | 12 ++++++------
 drivers/acpi/acpica/utobject.c  |  2 +-
 include/acpi/acpixf.h           |  2 +-
 include/acpi/actbl1.h           |  2 +-
 10 files changed, 29 insertions(+), 19 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/10 ACPICA: ASL-ASL+ converter: remove function parameters from cv_init_file_tree ()

ACPICA commit 3ba6fa55a4a32d8b6fc28f9f285506ea0e359296

These parameters can be computed inside of the function from the Table parameter.

---
 drivers/acpi/acpica/acconvert.h | 4 +---
 drivers/acpi/acpica/acmacros.h  | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/acpi/acpica/acconvert.h +1 -3
index ede4b9cc9e85..9eca93656116 100644
@@ -65,9 +65,7 @@ void cg_write_aml_comment(union acpi_parse_object *op);
 /*
  * cvparser
  */
-void
-cv_init_file_tree(struct acpi_table_header *table,
-		  u8 *aml_start, u32 aml_length);
+void cv_init_file_tree(struct acpi_table_header *table);
 
 void cv_clear_op_comments(union acpi_parse_object *op);
 
drivers/acpi/acpica/acmacros.h +2 -2
index 2269e10bc21b..87d06c963a60 100644
@@ -477,7 +477,7 @@
 #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) cv_print_one_comment_type (a,b,c,d);
 #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) cv_print_one_comment_list (a,b);
 #define ASL_CV_FILE_HAS_SWITCHED(a)       cv_file_has_switched(a)
-#define ASL_CV_INIT_FILETREE(a,b,c)      cv_init_file_tree(a,b,c);
+#define ASL_CV_INIT_FILETREE(a)      cv_init_file_tree(a);
 
 #else
 
@@ -492,7 +492,7 @@
 #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d)
 #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b)
 #define ASL_CV_FILE_HAS_SWITCHED(a)       0
-#define ASL_CV_INIT_FILETREE(a,b,c)
+#define ASL_CV_INIT_FILETREE(a)
 
 #endif
 
Signature · 1 line
2.21.0
#2 lore raw

PATCH 2/10 ACPICA: ASL-ASL+ converter: make root file a parameter for cv_init_file_tree

In reply to Erik Kaneda

ACPICA commit 5d160cc86cca440eac7055f981e48bc14d4eb9f7

This decouples cv_init_file_tree from acpi_gbl_output_file and allows it to be called independently of acpi_os_redirect_output()

---
 drivers/acpi/acpica/acconvert.h | 2 +-
 drivers/acpi/acpica/acmacros.h  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/acpica/acconvert.h +1 -1
index 9eca93656116..cf85d66da6e7 100644
@@ -65,7 +65,7 @@ void cg_write_aml_comment(union acpi_parse_object *op);
 /*
  * cvparser
  */
-void cv_init_file_tree(struct acpi_table_header *table);
+void cv_init_file_tree(struct acpi_table_header *table, FILE * root_file);
 
 void cv_clear_op_comments(union acpi_parse_object *op);
 
drivers/acpi/acpica/acmacros.h +2 -2
index 87d06c963a60..168904ba3086 100644
@@ -477,7 +477,7 @@
 #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) cv_print_one_comment_type (a,b,c,d);
 #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) cv_print_one_comment_list (a,b);
 #define ASL_CV_FILE_HAS_SWITCHED(a)       cv_file_has_switched(a)
-#define ASL_CV_INIT_FILETREE(a)      cv_init_file_tree(a);
+#define ASL_CV_INIT_FILETREE(a,b)      cv_init_file_tree(a,b);
 
 #else
 
@@ -492,7 +492,7 @@
 #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d)
 #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b)
 #define ASL_CV_FILE_HAS_SWITCHED(a)       0
-#define ASL_CV_INIT_FILETREE(a)
+#define ASL_CV_INIT_FILETREE(a,b)
 
 #endif
 
Signature · 1 line
2.21.0
#3 lore raw

PATCH 3/10 ACPICA: Fix a comment "enable" fixed events -> "disable" all fixed events.

In reply to Erik Kaneda

From: Bob Moore <[email protected]>

ACPICA commit af4462c6f41ebc9bf63b5370818c5fd96524e7a9

---
 drivers/acpi/acpica/evevent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/evevent.c +1 -1
index 8c83d8c620dc..89391938193d 100644
@@ -130,7 +130,7 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
 
 	/*
 	 * Initialize the structure that keeps track of fixed event handlers and
-	 * enable the fixed events.
+	 * disable all of the fixed events.
 	 */
 	for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) {
 		acpi_gbl_fixed_event_handlers[i].handler = NULL;
Signature · 1 line
2.21.0
#4 lore raw

PATCH 4/10 ACPICA: Enable sleep button on ACPI legacy wake

In reply to Erik Kaneda

From: Anchal Agarwal <[email protected]>

ACPICA commit 9383f5b01091e432c05f802a57edc20d329eec1f

Hibernation (S4) is triggered in a guest when it recieves a sleep trigger from the hypervisor. When the guest resumes from this power state, it does not see the sleep_enabled bit. In otherwords, the sleep button is not enabled on waking from an S4 state. This causes subsequent invocation of sleep state to fail in the guest.

Fix this problem by enabling the sleep button in ACPI legacy wake.

---
 drivers/acpi/acpica/hwsleep.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/acpi/acpica/hwsleep.c +12 -0
index 243a25add28f..317ae870336b 100644
@@ -300,6 +300,18 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state)
 				    [ACPI_EVENT_POWER_BUTTON].
 				    status_register_id, ACPI_CLEAR_STATUS);
 
+	/* Enable sleep button */
+
+	(void)
+	    acpi_write_bit_register(acpi_gbl_fixed_event_info
+				    [ACPI_EVENT_SLEEP_BUTTON].
+				    enable_register_id, ACPI_ENABLE_EVENT);
+
+	(void)
+	    acpi_write_bit_register(acpi_gbl_fixed_event_info
+				    [ACPI_EVENT_SLEEP_BUTTON].
+				    status_register_id, ACPI_CLEAR_STATUS);
+
 	acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING);
 	return_ACPI_STATUS(status);
 }
Signature · 1 line
2.21.0
#5 lore raw

PATCH 5/10 ACPICA: Table Manager: Update comments in a function header

In reply to Erik Kaneda

From: Bob Moore <[email protected]>

Update acpi_get_table_header to remove text stating that the caller must unmap any returned memory.

ACPICA commit 4f3a235cf0044b2d91958b1f99b4ca824c63f948

---
 drivers/acpi/acpica/tbxface.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/acpi/acpica/tbxface.c +6 -6
index f8403d480318..7490429ddbf6 100644
@@ -202,14 +202,14 @@ ACPI_EXPORT_SYMBOL_INIT(acpi_reallocate_root_table)
  *
  * PARAMETERS:  signature           - ACPI signature of needed table
  *              instance            - Which instance (for SSDTs)
- *              out_table_header    - The pointer to the table header to fill
+ *              out_table_header    - The pointer to the where the table header
+ *                                    is returned
  *
- * RETURN:      Status and pointer to mapped table header
+ * RETURN:      Status and a copy of the table header
  *
- * DESCRIPTION: Finds an ACPI table header.
- *
- * NOTE:        Caller is responsible in unmapping the header with
- *              acpi_os_unmap_memory
+ * DESCRIPTION: Finds and returns an ACPI table header. Caller provides the
+ *              memory where a copy of the header is to be returned
+ *              (fixed length).
  *
  ******************************************************************************/
 acpi_status
Signature · 1 line
2.21.0
#6 lore raw

PATCH 6/10 ACPICA: cast the result of the pointer difference to u32

In reply to Erik Kaneda

From: Sven Barth <[email protected]>

Altnatively we could declare aml_length as acpi_size, but then one would need to cast at the assignment for method_obj->method.aml_length

ACPICA commit 72805936603fcf84e98f1b89bf99b5101af27fb8

---
 drivers/acpi/acpica/nsxfname.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/nsxfname.c +1 -1
index 984129dcaa0c..0e6aba81605b 100644
@@ -516,7 +516,7 @@ acpi_status acpi_install_method(u8 *buffer)
 
 	method_flags = *parser_state.aml++;
 	aml_start = parser_state.aml;
-	aml_length = ACPI_PTR_DIFF(parser_state.pkg_end, aml_start);
+	aml_length = (u32)ACPI_PTR_DIFF(parser_state.pkg_end, aml_start);
 
 	/*
 	 * Allocate resources up-front. We don't want to have to delete a new
Signature · 1 line
2.21.0
#7 lore raw

PATCH 7/10 ACPICA: cast length arguement to acpi_ns_build_normalized_path() as u32

In reply to Erik Kaneda

From: Sven Barth <[email protected]>

ACPICA commit d216e4c8d886d7fb82697948c4fee8a5777a1a5a

---
 drivers/acpi/acpica/nsnames.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/acpica/nsnames.c +2 -2
index 370bbc867745..832b79c4b008 100644
@@ -164,7 +164,7 @@ acpi_ns_handle_to_pathname(acpi_handle target_handle,
 	/* Build the path in the caller buffer */
 
 	(void)acpi_ns_build_normalized_path(node, buffer->pointer,
-					    required_size, no_trailing);
+					    (u32)required_size, no_trailing);
 
 	ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n",
 			  (char *)buffer->pointer, (u32) required_size));
@@ -315,7 +315,7 @@ char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
 
 	/* Build the path in the allocated buffer */
 
-	(void)acpi_ns_build_normalized_path(node, name_buffer, size,
+	(void)acpi_ns_build_normalized_path(node, name_buffer, (u32)size,
 					    no_trailing);
 
 	ACPI_DEBUG_PRINT_RAW((ACPI_DB_NAMES, "%s: Path \"%s\"\n",
Signature · 1 line
2.21.0
#8 lore raw

PATCH 8/10 ACPICA: use acpi_size instead of u32 for prefix_path_length

In reply to Erik Kaneda

From: Sven Barth <[email protected]>

strlen() returns a size_t, so use acpi_size instead of u32 for prefix_path_length.

ACPICA commit 0f64c317e769a63679442404421da1d5bd61068a

---
 drivers/acpi/acpica/nsnames.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/nsnames.c +1 -1
index 832b79c4b008..d4d26147610e 100644
@@ -346,7 +346,7 @@ char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
 	char *full_path = NULL;
 	char *external_path = NULL;
 	char *prefix_path = NULL;
-	u32 prefix_path_length = 0;
+	acpi_size prefix_path_length = 0;
 
 	/* If there is a prefix, get the pathname to it */
 
Signature · 1 line
2.21.0
#9 lore raw

PATCH 9/10 ACPICA: Fix a couple of typos

In reply to Erik Kaneda

From: Bob Moore <[email protected]>

Squashed ACPICA commit e93a53d4d312a83a3ec72aa9cfb12d781b4fefca and df52c574572344cd9095b66a0f580d51249deb2a

Submitted by: [email protected]

---
 drivers/acpi/acpica/utobject.c | 2 +-
 include/acpi/actbl1.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/acpica/utobject.c +1 -1
index 3e60bdac2200..bbec04c291d2 100644
@@ -44,7 +44,7 @@ acpi_ut_get_element_length(u8 object_type,
  *
  * NOTE:        We always allocate the worst-case object descriptor because
  *              these objects are cached, and we want them to be
- *              one-size-satisifies-any-request. This in itself may not be
+ *              one-size-satisfies-any-request. This in itself may not be
  *              the most memory efficient, but the efficiency of the object
  *              cache should more than make up for this!
  *
include/acpi/actbl1.h +1 -1
index 02d06b79e1cd..43549547ed3e 100644
@@ -862,7 +862,7 @@ enum acpi_erst_instructions {
 /* Command status return values */
 
 enum acpi_erst_command_status {
-	ACPI_ERST_SUCESS = 0,
+	ACPI_ERST_SUCCESS = 0,
 	ACPI_ERST_NO_SPACE = 1,
 	ACPI_ERST_NOT_AVAILABLE = 2,
 	ACPI_ERST_FAILURE = 3,
Signature · 1 line
2.21.0
#10 lore raw

PATCH 10/10 ACPICA: Update version to 20200214 Version 20200214.

In reply to Erik Kaneda

From: Bob Moore <[email protected]>

ACPICA commit ac0c1b8a43a317702bb11e11fd5067a1c59e3002

---
 include/acpi/acpixf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/acpi/acpixf.h +1 -1
index 5867777bb7d0..e4faf1a9c8fb 100644
@@ -12,7 +12,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20200110
+#define ACPI_CA_VERSION                 0x20200214
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
Signature · 1 line
2.21.0
#11 lore raw
In reply to Erik Kaneda
Quoted 28 lines · Erik Kaneda

This patch series contains the 20200214 release of ACPICA. For linux, this a relatively small release. Major changes include Enabling the sleep button on ACPI legacy wake. Aside from that, this release mainly consists of changes in the converter, type casts to suppress compiler warnings when building in 64 bit mode on msvc 2019, and updates to comments.

This patch set is also available for viewing at the following link:

Anchal Agarwal (1):
ACPICA: Enable sleep button on ACPI legacy wake

Bob Moore (4):
ACPICA: Fix a comment "enable" fixed events -> "disable" all fixed
events.
ACPICA: Table Manager: Update comments in a function header
ACPICA: Fix a couple of typos
ACPICA: Update version to 20200214 Version 20200214.

Erik Kaneda (2):
ACPICA: ASL-ASL+ converter: remove function parameters from
cv_init_file_tree ()
ACPICA: ASL-ASL+ converter: make root file a parameter for
cv_init_file_tree

Quoted 5 lines

Sven Barth (3):
ACPICA: cast the result of the pointer difference to u32
ACPICA: cast length arguement to acpi_ns_build_normalized_path() as

    u32

ACPICA: use acpi_size instead of u32 for prefix_path_length

The whole series has been queued up as 5.7 material, thanks!