aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dsopcode.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-13 16:22:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-20 02:23:50 -0500
commit4a90c7e86202f46fa9af011bdbcdf36e355d1721 (patch)
tree3784cffb2166330d6f94ea53996fbeef36f58ce3 /drivers/acpi/dispatcher/dsopcode.c
parent3c5c363826e435cf4d54d917202567e5b57cae5f (diff)
[ACPI] ACPICA 20060113
Added 2006 copyright. At SuSE's suggestion, enabled all error messages without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively. This preserves all error and warning messages in the non-debug version of the ACPICA code (this has been referred to as the "debug lite" option.) Over 200 cases were converted to create a total of over 380 error/warning messages across the ACPICA code. This increases the code and data size of the default non-debug version by about 13K. Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages. The size of the debug version remains about the same. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dispatcher/dsopcode.c')
-rw-r--r--drivers/acpi/dispatcher/dsopcode.c41
1 files changed, 15 insertions, 26 deletions
diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c
index 939d167bf87b..60414ee84b0a 100644
--- a/drivers/acpi/dispatcher/dsopcode.c
+++ b/drivers/acpi/dispatcher/dsopcode.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
@@ -413,9 +413,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
413 /* Host object must be a Buffer */ 413 /* Host object must be a Buffer */
414 414
415 if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) { 415 if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) {
416 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 416 ACPI_REPORT_ERROR(("Target of Create Field is not a Buffer object - %s\n", acpi_ut_get_object_type_name(buffer_desc)));
417 "Target of Create Field is not a Buffer object - %s\n",
418 acpi_ut_get_object_type_name(buffer_desc)));
419 417
420 status = AE_AML_OPERAND_TYPE; 418 status = AE_AML_OPERAND_TYPE;
421 goto cleanup; 419 goto cleanup;
@@ -427,10 +425,9 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
427 * after resolution in acpi_ex_resolve_operands(). 425 * after resolution in acpi_ex_resolve_operands().
428 */ 426 */
429 if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) { 427 if (ACPI_GET_DESCRIPTOR_TYPE(result_desc) != ACPI_DESC_TYPE_NAMED) {
430 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 428 ACPI_REPORT_ERROR(("(%s) destination not a NS Node [%s]\n",
431 "(%s) destination not a NS Node [%s]\n", 429 acpi_ps_get_opcode_name(aml_opcode),
432 acpi_ps_get_opcode_name(aml_opcode), 430 acpi_ut_get_descriptor_name(result_desc)));
433 acpi_ut_get_descriptor_name(result_desc)));
434 431
435 status = AE_AML_OPERAND_TYPE; 432 status = AE_AML_OPERAND_TYPE;
436 goto cleanup; 433 goto cleanup;
@@ -453,8 +450,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
453 /* Must have a valid (>0) bit count */ 450 /* Must have a valid (>0) bit count */
454 451
455 if (bit_count == 0) { 452 if (bit_count == 0) {
456 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 453 ACPI_REPORT_ERROR(("Attempt to create_field of length 0\n"));
457 "Attempt to create_field of length 0\n"));
458 status = AE_AML_OPERAND_VALUE; 454 status = AE_AML_OPERAND_VALUE;
459 goto cleanup; 455 goto cleanup;
460 } 456 }
@@ -507,9 +503,8 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
507 503
508 default: 504 default:
509 505
510 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 506 ACPI_REPORT_ERROR(("Unknown field creation opcode %02x\n",
511 "Unknown field creation opcode %02x\n", 507 aml_opcode));
512 aml_opcode));
513 status = AE_AML_BAD_OPCODE; 508 status = AE_AML_BAD_OPCODE;
514 goto cleanup; 509 goto cleanup;
515 } 510 }
@@ -517,13 +512,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
517 /* Entire field must fit within the current length of the buffer */ 512 /* Entire field must fit within the current length of the buffer */
518 513
519 if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) { 514 if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) {
520 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 515 ACPI_REPORT_ERROR(("Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", acpi_ut_get_node_name(result_desc), bit_offset + bit_count, acpi_ut_get_node_name(buffer_desc->buffer.node), 8 * (u32) buffer_desc->buffer.length));
521 "Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n",
522 acpi_ut_get_node_name(result_desc),
523 bit_offset + bit_count,
524 acpi_ut_get_node_name(buffer_desc->buffer.
525 node),
526 8 * (u32) buffer_desc->buffer.length));
527 status = AE_AML_BUFFER_LIMIT; 516 status = AE_AML_BUFFER_LIMIT;
528 goto cleanup; 517 goto cleanup;
529 } 518 }
@@ -629,9 +618,10 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state,
629 "after acpi_ex_resolve_operands"); 618 "after acpi_ex_resolve_operands");
630 619
631 if (ACPI_FAILURE(status)) { 620 if (ACPI_FAILURE(status)) {
632 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "(%s) bad operand(s) (%X)\n", 621 ACPI_REPORT_ERROR(("(%s) bad operand(s) (%X)\n",
633 acpi_ps_get_opcode_name(op->common. 622 acpi_ps_get_opcode_name(op->common.
634 aml_opcode), status)); 623 aml_opcode),
624 status));
635 625
636 return_ACPI_STATUS(status); 626 return_ACPI_STATUS(status);
637 } 627 }
@@ -1155,9 +1145,8 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state,
1155 1145
1156 default: 1146 default:
1157 1147
1158 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1148 ACPI_REPORT_ERROR(("Unknown control opcode=%X Op=%p\n",
1159 "Unknown control opcode=%X Op=%p\n", 1149 op->common.aml_opcode, op));
1160 op->common.aml_opcode, op));
1161 1150
1162 status = AE_AML_BAD_OPCODE; 1151 status = AE_AML_BAD_OPCODE;
1163 break; 1152 break;