Skip to content

Commit ae90fbf

Browse files
acpibobrafaeljw
authored andcommitted
ACPICA: Parser: Fix for SuperName method invocation
ACPICA commit 4b86d1046d06e462dae83ebcd5a66cc132a08f8f SuperName parameters that are in fact control method invocations were not handled correctly by the parser. This change fixes the problem by identifying these properly as method invocations. This affects about 14 different ASL operators that contain SuperName parameters. ACPICA BZ 1002. Link: acpica/acpica@4b86d104 Link: https://bugs.acpica.org/show_bug.cgi?id=1002 Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Lv Zheng <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 89438f9 commit ae90fbf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/acpi/acpica/psargs.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
269269
*/
270270
if (ACPI_SUCCESS(status) &&
271271
possible_method_call && (node->type == ACPI_TYPE_METHOD)) {
272-
if (walk_state->opcode == AML_UNLOAD_OP) {
272+
if (GET_CURRENT_ARG_TYPE(walk_state->arg_types) ==
273+
ARGP_SUPERNAME) {
273274
/*
274275
* acpi_ps_get_next_namestring has increased the AML pointer,
275276
* so we need to restore the saved AML pointer for method call.
@@ -696,7 +697,7 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
696697
*
697698
* PARAMETERS: walk_state - Current state
698699
* parser_state - Current parser state object
699-
* arg_type - The argument type (AML_*_ARG)
700+
* arg_type - The parser argument type (ARGP_*)
700701
* return_arg - Where the next arg is returned
701702
*
702703
* RETURN: Status, and an op object containing the next argument.
@@ -815,9 +816,9 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
815816
return_ACPI_STATUS(AE_NO_MEMORY);
816817
}
817818

818-
/* To support super_name arg of Unload */
819+
/* super_name allows argument to be a method call */
819820

820-
if (walk_state->opcode == AML_UNLOAD_OP) {
821+
if (arg_type == ARGP_SUPERNAME) {
821822
status =
822823
acpi_ps_get_next_namepath(walk_state,
823824
parser_state, arg,

0 commit comments

Comments
 (0)