X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fexecuter%2Fexresop.c;h=0bb82593da724d62ca766a2a843827a9cf33376c;hb=5579a782ad7ffa162b1060993e4a298dd50e7a33;hp=54085f16ec28360d4f252c3f8e34dc230da3cbff;hpb=f6dc8ccaab6d8f63cbae1e6c73fe972b26f5376c;p=linux-2.6-omap-h63xx.git diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index 54085f16ec2..0bb82593da7 100644 --- a/drivers/acpi/executer/exresop.c +++ b/drivers/acpi/executer/exresop.c @@ -225,41 +225,36 @@ acpi_ex_resolve_operands(u16 opcode, if (object_type == (u8) ACPI_TYPE_LOCAL_REFERENCE) { - /* Decode the Reference */ + /* Validate the Reference */ - op_info = acpi_ps_get_opcode_info(opcode); - if (op_info->class == AML_CLASS_UNKNOWN) { - return_ACPI_STATUS(AE_AML_BAD_OPCODE); - } + switch (obj_desc->reference.class) { + case ACPI_REFCLASS_DEBUG: - switch (obj_desc->reference.opcode) { - case AML_DEBUG_OP: target_op = AML_DEBUG_OP; /*lint -fallthrough */ - case AML_INDEX_OP: - case AML_REF_OF_OP: - case AML_ARG_OP: - case AML_LOCAL_OP: - case AML_LOAD_OP: /* ddb_handle from LOAD_OP or LOAD_TABLE_OP */ - case AML_INT_NAMEPATH_OP: /* Reference to a named object */ - - ACPI_DEBUG_ONLY_MEMBERS(ACPI_DEBUG_PRINT - ((ACPI_DB_EXEC, - "Operand is a Reference, RefOpcode [%s]\n", - (acpi_ps_get_opcode_info - (obj_desc-> - reference. - opcode))-> - name))); + case ACPI_REFCLASS_ARG: + case ACPI_REFCLASS_LOCAL: + case ACPI_REFCLASS_INDEX: + case ACPI_REFCLASS_REFOF: + case ACPI_REFCLASS_TABLE: /* ddb_handle from LOAD_OP or LOAD_TABLE_OP */ + case ACPI_REFCLASS_NAME: /* Reference to a named object */ + + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "Operand is a Reference, Class [%s] %2.2X\n", + acpi_ut_get_reference_name + (obj_desc), + obj_desc->reference. + class)); break; default: + ACPI_ERROR((AE_INFO, - "Operand is a Reference, Unknown Reference Opcode: %X", - obj_desc->reference. - opcode)); + "Unknown Reference Class %2.2X in %p", + obj_desc->reference.class, + obj_desc)); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); } @@ -270,8 +265,7 @@ acpi_ex_resolve_operands(u16 opcode, /* Invalid descriptor */ - ACPI_ERROR((AE_INFO, - "Invalid descriptor %p [%s]", + ACPI_ERROR((AE_INFO, "Invalid descriptor %p [%s]", obj_desc, acpi_ut_get_descriptor_name(obj_desc))); @@ -343,7 +337,7 @@ acpi_ex_resolve_operands(u16 opcode, if ((opcode == AML_STORE_OP) && (ACPI_GET_OBJECT_TYPE(*stack_ptr) == ACPI_TYPE_LOCAL_REFERENCE) - && ((*stack_ptr)->reference.opcode == AML_INDEX_OP)) { + && ((*stack_ptr)->reference.class == ACPI_REFCLASS_INDEX)) { goto next_operand; } break;