aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dswexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/dispatcher/dswexec.c')
-rw-r--r--drivers/acpi/dispatcher/dswexec.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c
index f1af655ff113..3acbd9145d72 100644
--- a/drivers/acpi/dispatcher/dswexec.c
+++ b/drivers/acpi/dispatcher/dswexec.c
@@ -49,7 +49,6 @@
49#include <acpi/acinterp.h> 49#include <acpi/acinterp.h>
50#include <acpi/acnamesp.h> 50#include <acpi/acnamesp.h>
51#include <acpi/acdebug.h> 51#include <acpi/acdebug.h>
52#include <acpi/acdisasm.h>
53 52
54#define _COMPONENT ACPI_DISPATCHER 53#define _COMPONENT ACPI_DISPATCHER
55ACPI_MODULE_NAME("dswexec") 54ACPI_MODULE_NAME("dswexec")
@@ -93,7 +92,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
93 union acpi_operand_object *obj_desc; 92 union acpi_operand_object *obj_desc;
94 union acpi_operand_object *local_obj_desc = NULL; 93 union acpi_operand_object *local_obj_desc = NULL;
95 94
96 ACPI_FUNCTION_TRACE_PTR("ds_get_predicate_value", walk_state); 95 ACPI_FUNCTION_TRACE_PTR(ds_get_predicate_value, walk_state);
97 96
98 walk_state->control_state->common.state = 0; 97 walk_state->control_state->common.state = 0;
99 98
@@ -123,7 +122,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
123 122
124 if (!obj_desc) { 123 if (!obj_desc) {
125 ACPI_ERROR((AE_INFO, 124 ACPI_ERROR((AE_INFO,
126 "No predicate obj_desc=%p State=%p", 125 "No predicate ObjDesc=%p State=%p",
127 obj_desc, walk_state)); 126 obj_desc, walk_state));
128 127
129 return_ACPI_STATUS(AE_AML_NO_OPERAND); 128 return_ACPI_STATUS(AE_AML_NO_OPERAND);
@@ -140,7 +139,7 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state,
140 139
141 if (ACPI_GET_OBJECT_TYPE(local_obj_desc) != ACPI_TYPE_INTEGER) { 140 if (ACPI_GET_OBJECT_TYPE(local_obj_desc) != ACPI_TYPE_INTEGER) {
142 ACPI_ERROR((AE_INFO, 141 ACPI_ERROR((AE_INFO,
143 "Bad predicate (not an integer) obj_desc=%p State=%p Type=%X", 142 "Bad predicate (not an integer) ObjDesc=%p State=%p Type=%X",
144 obj_desc, walk_state, 143 obj_desc, walk_state,
145 ACPI_GET_OBJECT_TYPE(obj_desc))); 144 ACPI_GET_OBJECT_TYPE(obj_desc)));
146 145
@@ -214,7 +213,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
214 acpi_status status = AE_OK; 213 acpi_status status = AE_OK;
215 u32 opcode_class; 214 u32 opcode_class;
216 215
217 ACPI_FUNCTION_TRACE_PTR("ds_exec_begin_op", walk_state); 216 ACPI_FUNCTION_TRACE_PTR(ds_exec_begin_op, walk_state);
218 217
219 op = walk_state->op; 218 op = walk_state->op;
220 if (!op) { 219 if (!op) {
@@ -296,7 +295,7 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
296 295
297 case AML_CLASS_NAMED_OBJECT: 296 case AML_CLASS_NAMED_OBJECT:
298 297
299 if (walk_state->walk_type == ACPI_WALK_METHOD) { 298 if (walk_state->walk_type & ACPI_WALK_METHOD) {
300 /* 299 /*
301 * Found a named object declaration during method execution; 300 * Found a named object declaration during method execution;
302 * we must enter this object into the namespace. The created 301 * we must enter this object into the namespace. The created
@@ -354,7 +353,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
354 union acpi_parse_object *next_op; 353 union acpi_parse_object *next_op;
355 union acpi_parse_object *first_arg; 354 union acpi_parse_object *first_arg;
356 355
357 ACPI_FUNCTION_TRACE_PTR("ds_exec_end_op", walk_state); 356 ACPI_FUNCTION_TRACE_PTR(ds_exec_end_op, walk_state);
358 357
359 op = walk_state->op; 358 op = walk_state->op;
360 op_type = walk_state->op_info->type; 359 op_type = walk_state->op_info->type;
@@ -409,6 +408,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
409 * being the object_type and size_of operators. 408 * being the object_type and size_of operators.
410 */ 409 */
411 if (!(walk_state->op_info->flags & AML_NO_OPERAND_RESOLVE)) { 410 if (!(walk_state->op_info->flags & AML_NO_OPERAND_RESOLVE)) {
411
412 /* Resolve all operands */ 412 /* Resolve all operands */
413 413
414 status = acpi_ex_resolve_operands(walk_state->opcode, 414 status = acpi_ex_resolve_operands(walk_state->opcode,
@@ -423,7 +423,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
423 acpi_ps_get_opcode_name 423 acpi_ps_get_opcode_name
424 (walk_state->opcode), 424 (walk_state->opcode),
425 walk_state->num_operands, 425 walk_state->num_operands,
426 "after ex_resolve_operands"); 426 "after ExResolveOperands");
427 } 427 }
428 } 428 }
429 429
@@ -437,7 +437,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
437 acpi_gbl_op_type_dispatch[op_type] (walk_state); 437 acpi_gbl_op_type_dispatch[op_type] (walk_state);
438 } else { 438 } else {
439 /* 439 /*
440 * Treat constructs of the form "Store(local_x,local_x)" as noops when the 440 * Treat constructs of the form "Store(LocalX,LocalX)" as noops when the
441 * Local is uninitialized. 441 * Local is uninitialized.
442 */ 442 */
443 if ((status == AE_AML_UNINITIALIZED_LOCAL) && 443 if ((status == AE_AML_UNINITIALIZED_LOCAL) &&
@@ -548,6 +548,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
548 */ 548 */
549 status = acpi_ds_resolve_operands(walk_state); 549 status = acpi_ds_resolve_operands(walk_state);
550 if (ACPI_FAILURE(status)) { 550 if (ACPI_FAILURE(status)) {
551
551 /* On error, clear all resolved operands */ 552 /* On error, clear all resolved operands */
552 553
553 acpi_ds_clear_operands(walk_state); 554 acpi_ds_clear_operands(walk_state);
@@ -569,7 +570,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
569 case AML_TYPE_CREATE_FIELD: 570 case AML_TYPE_CREATE_FIELD:
570 571
571 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 572 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
572 "Executing create_field Buffer/Index Op=%p\n", 573 "Executing CreateField Buffer/Index Op=%p\n",
573 op)); 574 op));
574 575
575 status = acpi_ds_load2_end_op(walk_state); 576 status = acpi_ds_load2_end_op(walk_state);
@@ -584,7 +585,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
584 case AML_TYPE_CREATE_OBJECT: 585 case AML_TYPE_CREATE_OBJECT:
585 586
586 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 587 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
587 "Executing create_object (Buffer/Package) Op=%p\n", 588 "Executing CreateObject (Buffer/Package) Op=%p\n",
588 op)); 589 op));
589 590
590 switch (op->common.parent->common.aml_opcode) { 591 switch (op->common.parent->common.aml_opcode) {
@@ -657,7 +658,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
657 658
658 if (op->common.aml_opcode == AML_REGION_OP) { 659 if (op->common.aml_opcode == AML_REGION_OP) {
659 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 660 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
660 "Executing op_region Address/Length Op=%p\n", 661 "Executing OpRegion Address/Length Op=%p\n",
661 op)); 662 op));
662 663
663 status = 664 status =
@@ -722,6 +723,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
722 cleanup: 723 cleanup:
723 724
724 if (walk_state->result_obj) { 725 if (walk_state->result_obj) {
726
725 /* Break to debugger to display result */ 727 /* Break to debugger to display result */
726 728
727 ACPI_DEBUGGER_EXEC(acpi_db_display_result_object 729 ACPI_DEBUGGER_EXEC(acpi_db_display_result_object