--- zzzz-none-000/linux-3.10.107/drivers/acpi/acpica/dsutils.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/acpi/acpica/dsutils.c 2021-02-04 17:41:59.000000000 +0000 @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2015, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -240,7 +240,6 @@ case AML_IF_OP: case AML_WHILE_OP: - /* * If we are executing the predicate AND this is the predicate op, * we will use the return value @@ -254,7 +253,9 @@ break; default: + /* Ignore other control opcodes */ + break; } @@ -263,7 +264,6 @@ goto result_not_used; case AML_CLASS_CREATE: - /* * These opcodes allow term_arg(s) as operands and therefore * the operands can be method calls. The result is used. @@ -292,7 +292,6 @@ goto result_not_used; default: - /* * In all other cases. the parent will actually use the return * object, so keep it. @@ -300,7 +299,7 @@ goto result_used; } - result_used: +result_used: ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Result of [%s] used by Parent [%s] Op=%p\n", acpi_ps_get_opcode_name(op->common.aml_opcode), @@ -309,7 +308,7 @@ return_UINT8(TRUE); - result_not_used: +result_not_used: ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, "Result of [%s] not used by Parent [%s] Op=%p\n", acpi_ps_get_opcode_name(op->common.aml_opcode), @@ -565,6 +564,17 @@ acpi_operand_object, acpi_gbl_root_node); status = AE_OK; + } else if (parent_op->common.aml_opcode == + AML_EXTERNAL_OP) { + + /* TBD: May only be temporary */ + + obj_desc = + acpi_ut_create_string_object((acpi_size) name_length); + + strncpy(obj_desc->string.pointer, + name_string, name_length); + status = AE_OK; } else { /* * We just plain didn't find it -- which is a @@ -728,32 +738,31 @@ index++; } - index--; + ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, + "NumOperands %d, ArgCount %d, Index %d\n", + walk_state->num_operands, arg_count, index)); - /* It is the appropriate order to get objects from the Result stack */ + /* Create the interpreter arguments, in reverse order */ + index--; for (i = 0; i < arg_count; i++) { arg = arguments[index]; - - /* Force the filling of the operand stack in inverse order */ - - walk_state->operand_index = (u8) index; + walk_state->operand_index = (u8)index; status = acpi_ds_create_operand(walk_state, arg, index); if (ACPI_FAILURE(status)) { goto cleanup; } - index--; - ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "Arg #%u (%p) done, Arg1=%p\n", index, arg, - first_arg)); + "Created Arg #%u (%p) %u args total\n", + index, arg, arg_count)); + index--; } return_ACPI_STATUS(status); - cleanup: +cleanup: /* * We must undo everything done above; meaning that we must * pop everything off of the operand stack and delete those @@ -852,7 +861,7 @@ goto exit; } - push_result: +push_result: walk_state->result_obj = new_obj_desc; @@ -864,7 +873,7 @@ op->common.flags |= ACPI_PARSEOP_IN_STACK; } - exit: +exit: return_ACPI_STATUS(status); }