diff options
Diffstat (limited to 'drivers/acpi/executer/exresop.c')
-rw-r--r-- | drivers/acpi/executer/exresop.c | 91 |
1 files changed, 25 insertions, 66 deletions
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index ff064e79ab90..804faebf825c 100644 --- a/drivers/acpi/executer/exresop.c +++ b/drivers/acpi/executer/exresop.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -73,7 +73,7 @@ static acpi_status | |||
73 | acpi_ex_check_object_type(acpi_object_type type_needed, | 73 | acpi_ex_check_object_type(acpi_object_type type_needed, |
74 | acpi_object_type this_type, void *object) | 74 | acpi_object_type this_type, void *object) |
75 | { | 75 | { |
76 | ACPI_FUNCTION_NAME("ex_check_object_type"); | 76 | ACPI_FUNCTION_ENTRY(); |
77 | 77 | ||
78 | if (type_needed == ACPI_TYPE_ANY) { | 78 | if (type_needed == ACPI_TYPE_ANY) { |
79 | /* All types OK, so we don't perform any typechecks */ | 79 | /* All types OK, so we don't perform any typechecks */ |
@@ -95,10 +95,9 @@ acpi_ex_check_object_type(acpi_object_type type_needed, | |||
95 | } | 95 | } |
96 | 96 | ||
97 | if (type_needed != this_type) { | 97 | if (type_needed != this_type) { |
98 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 98 | ACPI_REPORT_ERROR(("Needed type [%s], found [%s] %p\n", |
99 | "Needed [%s], found [%s] %p\n", | 99 | acpi_ut_get_type_name(type_needed), |
100 | acpi_ut_get_type_name(type_needed), | 100 | acpi_ut_get_type_name(this_type), object)); |
101 | acpi_ut_get_type_name(this_type), object)); | ||
102 | 101 | ||
103 | return (AE_AML_OPERAND_TYPE); | 102 | return (AE_AML_OPERAND_TYPE); |
104 | } | 103 | } |
@@ -151,13 +150,13 @@ acpi_ex_resolve_operands(u16 opcode, | |||
151 | 150 | ||
152 | arg_types = op_info->runtime_args; | 151 | arg_types = op_info->runtime_args; |
153 | if (arg_types == ARGI_INVALID_OPCODE) { | 152 | if (arg_types == ARGI_INVALID_OPCODE) { |
154 | ACPI_REPORT_ERROR(("resolve_operands: %X is not a valid AML opcode\n", opcode)); | 153 | ACPI_REPORT_ERROR(("Unknown AML opcode %X\n", opcode)); |
155 | 154 | ||
156 | return_ACPI_STATUS(AE_AML_INTERNAL); | 155 | return_ACPI_STATUS(AE_AML_INTERNAL); |
157 | } | 156 | } |
158 | 157 | ||
159 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 158 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
160 | "Opcode %X [%s] required_operand_types=%8.8X \n", | 159 | "Opcode %X [%s] required_operand_types=%8.8X\n", |
161 | opcode, op_info->name, arg_types)); | 160 | opcode, op_info->name, arg_types)); |
162 | 161 | ||
163 | /* | 162 | /* |
@@ -169,7 +168,8 @@ acpi_ex_resolve_operands(u16 opcode, | |||
169 | */ | 168 | */ |
170 | while (GET_CURRENT_ARG_TYPE(arg_types)) { | 169 | while (GET_CURRENT_ARG_TYPE(arg_types)) { |
171 | if (!stack_ptr || !*stack_ptr) { | 170 | if (!stack_ptr || !*stack_ptr) { |
172 | ACPI_REPORT_ERROR(("resolve_operands: Null stack entry at %p\n", stack_ptr)); | 171 | ACPI_REPORT_ERROR(("Null stack entry at %p\n", |
172 | stack_ptr)); | ||
173 | 173 | ||
174 | return_ACPI_STATUS(AE_AML_INTERNAL); | 174 | return_ACPI_STATUS(AE_AML_INTERNAL); |
175 | } | 175 | } |
@@ -198,9 +198,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
198 | /* Check for bad acpi_object_type */ | 198 | /* Check for bad acpi_object_type */ |
199 | 199 | ||
200 | if (!acpi_ut_valid_object_type(object_type)) { | 200 | if (!acpi_ut_valid_object_type(object_type)) { |
201 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 201 | ACPI_REPORT_ERROR(("Bad operand object type [%X]\n", object_type)); |
202 | "Bad operand object type [%X]\n", | ||
203 | object_type)); | ||
204 | 202 | ||
205 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 203 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
206 | } | 204 | } |
@@ -238,13 +236,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
238 | break; | 236 | break; |
239 | 237 | ||
240 | default: | 238 | default: |
241 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 239 | ACPI_REPORT_ERROR(("Operand is a Reference, Unknown Reference Opcode: %X\n", obj_desc->reference.opcode)); |
242 | "Operand is a Reference, Unknown Reference Opcode %X [%s]\n", | ||
243 | obj_desc->reference. | ||
244 | opcode, | ||
245 | (acpi_ps_get_opcode_info | ||
246 | (obj_desc->reference. | ||
247 | opcode))->name)); | ||
248 | 240 | ||
249 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 241 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
250 | } | 242 | } |
@@ -255,11 +247,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
255 | 247 | ||
256 | /* Invalid descriptor */ | 248 | /* Invalid descriptor */ |
257 | 249 | ||
258 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 250 | ACPI_REPORT_ERROR(("Invalid descriptor %p [%s]\n", |
259 | "Invalid descriptor %p [%s]\n", | 251 | obj_desc, |
260 | obj_desc, | 252 | acpi_ut_get_descriptor_name |
261 | acpi_ut_get_descriptor_name | 253 | (obj_desc))); |
262 | (obj_desc))); | ||
263 | 254 | ||
264 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 255 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
265 | } | 256 | } |
@@ -417,11 +408,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
417 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); | 408 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); |
418 | if (ACPI_FAILURE(status)) { | 409 | if (ACPI_FAILURE(status)) { |
419 | if (status == AE_TYPE) { | 410 | if (status == AE_TYPE) { |
420 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 411 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
421 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
422 | acpi_ut_get_object_type_name | ||
423 | (obj_desc), | ||
424 | obj_desc)); | ||
425 | 412 | ||
426 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 413 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
427 | } | 414 | } |
@@ -444,11 +431,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
444 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); | 431 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); |
445 | if (ACPI_FAILURE(status)) { | 432 | if (ACPI_FAILURE(status)) { |
446 | if (status == AE_TYPE) { | 433 | if (status == AE_TYPE) { |
447 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 434 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
448 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
449 | acpi_ut_get_object_type_name | ||
450 | (obj_desc), | ||
451 | obj_desc)); | ||
452 | 435 | ||
453 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 436 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
454 | } | 437 | } |
@@ -472,11 +455,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
472 | ACPI_IMPLICIT_CONVERT_HEX); | 455 | ACPI_IMPLICIT_CONVERT_HEX); |
473 | if (ACPI_FAILURE(status)) { | 456 | if (ACPI_FAILURE(status)) { |
474 | if (status == AE_TYPE) { | 457 | if (status == AE_TYPE) { |
475 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 458 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
476 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
477 | acpi_ut_get_object_type_name | ||
478 | (obj_desc), | ||
479 | obj_desc)); | ||
480 | 459 | ||
481 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 460 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
482 | } | 461 | } |
@@ -502,10 +481,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
502 | break; | 481 | break; |
503 | 482 | ||
504 | default: | 483 | default: |
505 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 484 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
506 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
507 | acpi_ut_get_object_type_name | ||
508 | (obj_desc), obj_desc)); | ||
509 | 485 | ||
510 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 486 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
511 | } | 487 | } |
@@ -539,10 +515,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
539 | break; | 515 | break; |
540 | 516 | ||
541 | default: | 517 | default: |
542 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 518 | ACPI_REPORT_ERROR(("Needed [Integer/String/Buffer], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
543 | "Needed [Integer/String/Buffer], found [%s] %p\n", | ||
544 | acpi_ut_get_object_type_name | ||
545 | (obj_desc), obj_desc)); | ||
546 | 519 | ||
547 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 520 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
548 | } | 521 | } |
@@ -566,10 +539,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
566 | break; | 539 | break; |
567 | 540 | ||
568 | default: | 541 | default: |
569 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 542 | ACPI_REPORT_ERROR(("Needed [Buffer/String/Package/Reference], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
570 | "Needed [Buffer/String/Package/Reference], found [%s] %p\n", | ||
571 | acpi_ut_get_object_type_name | ||
572 | (obj_desc), obj_desc)); | ||
573 | 543 | ||
574 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 544 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
575 | } | 545 | } |
@@ -588,10 +558,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
588 | break; | 558 | break; |
589 | 559 | ||
590 | default: | 560 | default: |
591 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 561 | ACPI_REPORT_ERROR(("Needed [Buffer/String/Package], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
592 | "Needed [Buffer/String/Package], found [%s] %p\n", | ||
593 | acpi_ut_get_object_type_name | ||
594 | (obj_desc), obj_desc)); | ||
595 | 562 | ||
596 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 563 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
597 | } | 564 | } |
@@ -611,10 +578,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
611 | break; | 578 | break; |
612 | 579 | ||
613 | default: | 580 | default: |
614 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 581 | ACPI_REPORT_ERROR(("Needed [Region/region_field], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
615 | "Needed [Region/region_field], found [%s] %p\n", | ||
616 | acpi_ut_get_object_type_name | ||
617 | (obj_desc), obj_desc)); | ||
618 | 582 | ||
619 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 583 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
620 | } | 584 | } |
@@ -656,10 +620,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
656 | break; | 620 | break; |
657 | } | 621 | } |
658 | 622 | ||
659 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 623 | ACPI_REPORT_ERROR(("Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", acpi_ut_get_object_type_name(obj_desc), obj_desc)); |
660 | "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", | ||
661 | acpi_ut_get_object_type_name | ||
662 | (obj_desc), obj_desc)); | ||
663 | 624 | ||
664 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 625 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
665 | } | 626 | } |
@@ -669,9 +630,7 @@ acpi_ex_resolve_operands(u16 opcode, | |||
669 | 630 | ||
670 | /* Unknown type */ | 631 | /* Unknown type */ |
671 | 632 | ||
672 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 633 | ACPI_REPORT_ERROR(("Internal - Unknown ARGI (required operand) type %X\n", this_arg_type)); |
673 | "Internal - Unknown ARGI (required operand) type %X\n", | ||
674 | this_arg_type)); | ||
675 | 634 | ||
676 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 635 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
677 | } | 636 | } |