diff options
Diffstat (limited to 'drivers/acpi/executer')
23 files changed, 851 insertions, 665 deletions
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 1ce365d651d8..a29782fe3ecf 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -413,9 +413,9 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
| 413 | (!ACPI_STRNCMP(table_ptr->signature, | 413 | (!ACPI_STRNCMP(table_ptr->signature, |
| 414 | acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, | 414 | acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, |
| 415 | acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { | 415 | acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { |
| 416 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 416 | ACPI_ERROR((AE_INFO, |
| 417 | "Table has invalid signature [%4.4s], must be SSDT or PSDT\n", | 417 | "Table has invalid signature [%4.4s], must be SSDT or PSDT", |
| 418 | table_ptr->signature)); | 418 | table_ptr->signature)); |
| 419 | status = AE_BAD_SIGNATURE; | 419 | status = AE_BAD_SIGNATURE; |
| 420 | goto cleanup; | 420 | goto cleanup; |
| 421 | } | 421 | } |
diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c index 04e5194989a6..e6d52e12d77a 100644 --- a/drivers/acpi/executer/exconvrt.c +++ b/drivers/acpi/executer/exconvrt.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -504,18 +504,12 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, | |||
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | /* | 506 | /* |
| 507 | * Perform the conversion. | 507 | * Create a new string object and string buffer |
| 508 | * (-1 because of extra separator included in string_length from above) | 508 | * (-1 because of extra separator included in string_length from above) |
| 509 | */ | 509 | */ |
| 510 | string_length--; | ||
| 511 | if (string_length > ACPI_MAX_STRING_CONVERSION) { /* ACPI limit */ | ||
| 512 | return_ACPI_STATUS(AE_AML_STRING_LIMIT); | ||
| 513 | } | ||
| 514 | |||
| 515 | /* Create a new string object and string buffer */ | ||
| 516 | |||
| 517 | return_desc = | 510 | return_desc = |
| 518 | acpi_ut_create_string_object((acpi_size) string_length); | 511 | acpi_ut_create_string_object((acpi_size) |
| 512 | (string_length - 1)); | ||
| 519 | if (!return_desc) { | 513 | if (!return_desc) { |
| 520 | return_ACPI_STATUS(AE_NO_MEMORY); | 514 | return_ACPI_STATUS(AE_NO_MEMORY); |
| 521 | } | 515 | } |
| @@ -647,7 +641,9 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, | |||
| 647 | break; | 641 | break; |
| 648 | 642 | ||
| 649 | default: | 643 | default: |
| 650 | ACPI_REPORT_ERROR(("Bad destination type during conversion: %X\n", destination_type)); | 644 | ACPI_ERROR((AE_INFO, |
| 645 | "Bad destination type during conversion: %X", | ||
| 646 | destination_type)); | ||
| 651 | status = AE_AML_INTERNAL; | 647 | status = AE_AML_INTERNAL; |
| 652 | break; | 648 | break; |
| 653 | } | 649 | } |
| @@ -660,17 +656,13 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, | |||
| 660 | break; | 656 | break; |
| 661 | 657 | ||
| 662 | default: | 658 | default: |
| 663 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 659 | ACPI_ERROR((AE_INFO, |
| 664 | "Unknown Target type ID 0x%X Op %s dest_type %s\n", | 660 | "Unknown Target type ID 0x%X aml_opcode %X dest_type %s", |
| 665 | GET_CURRENT_ARG_TYPE(walk_state->op_info-> | 661 | GET_CURRENT_ARG_TYPE(walk_state->op_info-> |
| 666 | runtime_args), | 662 | runtime_args), |
| 667 | walk_state->op_info->name, | 663 | walk_state->opcode, |
| 668 | acpi_ut_get_type_name(destination_type))); | 664 | acpi_ut_get_type_name(destination_type))); |
| 669 | 665 | status = AE_AML_INTERNAL; | |
| 670 | ACPI_REPORT_ERROR(("Bad Target Type (ARGI): %X\n", | ||
| 671 | GET_CURRENT_ARG_TYPE(walk_state->op_info-> | ||
| 672 | runtime_args))) | ||
| 673 | status = AE_AML_INTERNAL; | ||
| 674 | } | 666 | } |
| 675 | 667 | ||
| 676 | /* | 668 | /* |
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 91c49188fb07..680575402835 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -300,8 +300,8 @@ acpi_ex_create_region(u8 * aml_start, | |||
| 300 | */ | 300 | */ |
| 301 | if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) && | 301 | if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) && |
| 302 | (region_space < ACPI_USER_REGION_BEGIN)) { | 302 | (region_space < ACPI_USER_REGION_BEGIN)) { |
| 303 | ACPI_REPORT_ERROR(("Invalid address_space type %X\n", | 303 | ACPI_ERROR((AE_INFO, "Invalid address_space type %X", |
| 304 | region_space)); | 304 | region_space)); |
| 305 | return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); | 305 | return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); |
| 306 | } | 306 | } |
| 307 | 307 | ||
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index bc2fa996047e..a7cca8d4f855 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -55,20 +55,386 @@ ACPI_MODULE_NAME("exdump") | |||
| 55 | */ | 55 | */ |
| 56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
| 57 | /* Local prototypes */ | 57 | /* Local prototypes */ |
| 58 | #ifdef ACPI_FUTURE_USAGE | ||
| 59 | static void acpi_ex_out_string(char *title, char *value); | 58 | static void acpi_ex_out_string(char *title, char *value); |
| 60 | 59 | ||
| 61 | static void acpi_ex_out_pointer(char *title, void *value); | 60 | static void acpi_ex_out_pointer(char *title, void *value); |
| 62 | 61 | ||
| 63 | static void acpi_ex_out_integer(char *title, u32 value); | ||
| 64 | |||
| 65 | static void acpi_ex_out_address(char *title, acpi_physical_address value); | 62 | static void acpi_ex_out_address(char *title, acpi_physical_address value); |
| 66 | 63 | ||
| 67 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc); | 64 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); |
| 68 | 65 | ||
| 69 | static void | 66 | static void |
| 70 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index); | 67 | acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, |
| 71 | #endif /* ACPI_FUTURE_USAGE */ | 68 | u32 level, u32 index); |
| 69 | |||
| 70 | /******************************************************************************* | ||
| 71 | * | ||
| 72 | * Object Descriptor info tables | ||
| 73 | * | ||
| 74 | * Note: The first table entry must be an INIT opcode and must contain | ||
| 75 | * the table length (number of table entries) | ||
| 76 | * | ||
| 77 | ******************************************************************************/ | ||
| 78 | |||
| 79 | static struct acpi_exdump_info acpi_ex_dump_integer[2] = { | ||
| 80 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_integer), NULL}, | ||
| 81 | {ACPI_EXD_UINT64, ACPI_EXD_OFFSET(integer.value), "Value"} | ||
| 82 | }; | ||
| 83 | |||
| 84 | static struct acpi_exdump_info acpi_ex_dump_string[4] = { | ||
| 85 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_string), NULL}, | ||
| 86 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(string.length), "Length"}, | ||
| 87 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(string.pointer), "Pointer"}, | ||
| 88 | {ACPI_EXD_STRING, 0, NULL} | ||
| 89 | }; | ||
| 90 | |||
| 91 | static struct acpi_exdump_info acpi_ex_dump_buffer[4] = { | ||
| 92 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL}, | ||
| 93 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"}, | ||
| 94 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"}, | ||
| 95 | {ACPI_EXD_BUFFER, 0, NULL} | ||
| 96 | }; | ||
| 97 | |||
| 98 | static struct acpi_exdump_info acpi_ex_dump_package[5] = { | ||
| 99 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL}, | ||
| 100 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"}, | ||
| 101 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"}, | ||
| 102 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"}, | ||
| 103 | {ACPI_EXD_PACKAGE, 0, NULL} | ||
| 104 | }; | ||
| 105 | |||
| 106 | static struct acpi_exdump_info acpi_ex_dump_device[4] = { | ||
| 107 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL}, | ||
| 108 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"}, | ||
| 109 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.system_notify), | ||
| 110 | "System Notify"}, | ||
| 111 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.device_notify), | ||
| 112 | "Device Notify"} | ||
| 113 | }; | ||
| 114 | |||
| 115 | static struct acpi_exdump_info acpi_ex_dump_event[2] = { | ||
| 116 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL}, | ||
| 117 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"} | ||
| 118 | }; | ||
| 119 | |||
| 120 | static struct acpi_exdump_info acpi_ex_dump_method[8] = { | ||
| 121 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, | ||
| 122 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "param_count"}, | ||
| 123 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, | ||
| 124 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, | ||
| 125 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, | ||
| 126 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, | ||
| 127 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, | ||
| 128 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"} | ||
| 129 | }; | ||
| 130 | |||
| 131 | static struct acpi_exdump_info acpi_ex_dump_mutex[5] = { | ||
| 132 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_mutex), NULL}, | ||
| 133 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(mutex.sync_level), "Sync Level"}, | ||
| 134 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"}, | ||
| 135 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth), | ||
| 136 | "Acquire Depth"}, | ||
| 137 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.semaphore), "Semaphore"} | ||
| 138 | }; | ||
| 139 | |||
| 140 | static struct acpi_exdump_info acpi_ex_dump_region[7] = { | ||
| 141 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL}, | ||
| 142 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"}, | ||
| 143 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"}, | ||
| 144 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"}, | ||
| 145 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"}, | ||
| 146 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"}, | ||
| 147 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"} | ||
| 148 | }; | ||
| 149 | |||
| 150 | static struct acpi_exdump_info acpi_ex_dump_power[5] = { | ||
| 151 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL}, | ||
| 152 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level), | ||
| 153 | "System Level"}, | ||
| 154 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.resource_order), | ||
| 155 | "Resource Order"}, | ||
| 156 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.system_notify), | ||
| 157 | "System Notify"}, | ||
| 158 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.device_notify), | ||
| 159 | "Device Notify"} | ||
| 160 | }; | ||
| 161 | |||
| 162 | static struct acpi_exdump_info acpi_ex_dump_processor[7] = { | ||
| 163 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_processor), NULL}, | ||
| 164 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.proc_id), "Processor ID"}, | ||
| 165 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(processor.length), "Length"}, | ||
| 166 | {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(processor.address), "Address"}, | ||
| 167 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.system_notify), | ||
| 168 | "System Notify"}, | ||
| 169 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.device_notify), | ||
| 170 | "Device Notify"}, | ||
| 171 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(processor.handler), "Handler"} | ||
| 172 | }; | ||
| 173 | |||
| 174 | static struct acpi_exdump_info acpi_ex_dump_thermal[4] = { | ||
| 175 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_thermal), NULL}, | ||
| 176 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.system_notify), | ||
| 177 | "System Notify"}, | ||
| 178 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.device_notify), | ||
| 179 | "Device Notify"}, | ||
| 180 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(thermal_zone.handler), "Handler"} | ||
| 181 | }; | ||
| 182 | |||
| 183 | static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = { | ||
| 184 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer_field), NULL}, | ||
| 185 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 186 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer_field.buffer_obj), | ||
| 187 | "Buffer Object"} | ||
| 188 | }; | ||
| 189 | |||
| 190 | static struct acpi_exdump_info acpi_ex_dump_region_field[3] = { | ||
| 191 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region_field), NULL}, | ||
| 192 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 193 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"} | ||
| 194 | }; | ||
| 195 | |||
| 196 | static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = { | ||
| 197 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL}, | ||
| 198 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 199 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(bank_field.value), "Value"}, | ||
| 200 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.region_obj), | ||
| 201 | "Region Object"}, | ||
| 202 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(bank_field.bank_obj), "Bank Object"} | ||
| 203 | }; | ||
| 204 | |||
| 205 | static struct acpi_exdump_info acpi_ex_dump_index_field[5] = { | ||
| 206 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_bank_field), NULL}, | ||
| 207 | {ACPI_EXD_FIELD, 0, NULL}, | ||
| 208 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(index_field.value), "Value"}, | ||
| 209 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.index_obj), | ||
| 210 | "Index Object"}, | ||
| 211 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} | ||
| 212 | }; | ||
| 213 | |||
| 214 | static struct acpi_exdump_info acpi_ex_dump_reference[7] = { | ||
| 215 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, | ||
| 216 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, | ||
| 217 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, | ||
| 218 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, | ||
| 219 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, | ||
| 220 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, | ||
| 221 | {ACPI_EXD_REFERENCE, 0, NULL} | ||
| 222 | }; | ||
| 223 | |||
| 224 | static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = { | ||
| 225 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler), | ||
| 226 | NULL}, | ||
| 227 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"}, | ||
| 228 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"}, | ||
| 229 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list), | ||
| 230 | "Region List"}, | ||
| 231 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"}, | ||
| 232 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"} | ||
| 233 | }; | ||
| 234 | |||
| 235 | static struct acpi_exdump_info acpi_ex_dump_notify[3] = { | ||
| 236 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL}, | ||
| 237 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"}, | ||
| 238 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"} | ||
| 239 | }; | ||
| 240 | |||
| 241 | /* Miscellaneous tables */ | ||
| 242 | |||
| 243 | static struct acpi_exdump_info acpi_ex_dump_common[4] = { | ||
| 244 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL}, | ||
| 245 | {ACPI_EXD_TYPE, 0, NULL}, | ||
| 246 | {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count), | ||
| 247 | "Reference Count"}, | ||
| 248 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"} | ||
| 249 | }; | ||
| 250 | |||
| 251 | static struct acpi_exdump_info acpi_ex_dump_field_common[7] = { | ||
| 252 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_field_common), NULL}, | ||
| 253 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.field_flags), | ||
| 254 | "Field Flags"}, | ||
| 255 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.access_byte_width), | ||
| 256 | "Access Byte Width"}, | ||
| 257 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.bit_length), | ||
| 258 | "Bit Length"}, | ||
| 259 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common_field.start_field_bit_offset), | ||
| 260 | "Field Bit Offset"}, | ||
| 261 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset), | ||
| 262 | "Base Byte Offset"}, | ||
| 263 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"} | ||
| 264 | }; | ||
| 265 | |||
| 266 | static struct acpi_exdump_info acpi_ex_dump_node[6] = { | ||
| 267 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL}, | ||
| 268 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"}, | ||
| 269 | {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"}, | ||
| 270 | {ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(reference_count), | ||
| 271 | "Reference Count"}, | ||
| 272 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"}, | ||
| 273 | {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"} | ||
| 274 | }; | ||
| 275 | |||
| 276 | /* Dispatch table, indexed by object type */ | ||
| 277 | |||
| 278 | static struct acpi_exdump_info *acpi_ex_dump_info[] = { | ||
| 279 | NULL, | ||
| 280 | acpi_ex_dump_integer, | ||
| 281 | acpi_ex_dump_string, | ||
| 282 | acpi_ex_dump_buffer, | ||
| 283 | acpi_ex_dump_package, | ||
| 284 | NULL, | ||
| 285 | acpi_ex_dump_device, | ||
| 286 | acpi_ex_dump_event, | ||
| 287 | acpi_ex_dump_method, | ||
| 288 | acpi_ex_dump_mutex, | ||
| 289 | acpi_ex_dump_region, | ||
| 290 | acpi_ex_dump_power, | ||
| 291 | acpi_ex_dump_processor, | ||
| 292 | acpi_ex_dump_thermal, | ||
| 293 | acpi_ex_dump_buffer_field, | ||
| 294 | NULL, | ||
| 295 | NULL, | ||
| 296 | acpi_ex_dump_region_field, | ||
| 297 | acpi_ex_dump_bank_field, | ||
| 298 | acpi_ex_dump_index_field, | ||
| 299 | acpi_ex_dump_reference, | ||
| 300 | NULL, | ||
| 301 | NULL, | ||
| 302 | acpi_ex_dump_notify, | ||
| 303 | acpi_ex_dump_address_handler, | ||
| 304 | NULL, | ||
| 305 | NULL, | ||
| 306 | NULL | ||
| 307 | }; | ||
| 308 | |||
| 309 | /******************************************************************************* | ||
| 310 | * | ||
| 311 | * FUNCTION: acpi_ex_dump_object | ||
| 312 | * | ||
| 313 | * PARAMETERS: obj_desc - Descriptor to dump | ||
| 314 | * Info - Info table corresponding to this object | ||
| 315 | * type | ||
| 316 | * | ||
| 317 | * RETURN: None | ||
| 318 | * | ||
| 319 | * DESCRIPTION: Walk the info table for this object | ||
| 320 | * | ||
| 321 | ******************************************************************************/ | ||
| 322 | |||
| 323 | static void | ||
| 324 | acpi_ex_dump_object(union acpi_operand_object *obj_desc, | ||
| 325 | struct acpi_exdump_info *info) | ||
| 326 | { | ||
| 327 | u8 *target; | ||
| 328 | char *name; | ||
| 329 | u8 count; | ||
| 330 | |||
| 331 | if (!info) { | ||
| 332 | acpi_os_printf | ||
| 333 | ("ex_dump_object: Display not implemented for object type %s\n", | ||
| 334 | acpi_ut_get_object_type_name(obj_desc)); | ||
| 335 | return; | ||
| 336 | } | ||
| 337 | |||
| 338 | /* First table entry must contain the table length (# of table entries) */ | ||
| 339 | |||
| 340 | count = info->offset; | ||
| 341 | |||
| 342 | while (count) { | ||
| 343 | target = ACPI_ADD_PTR(u8, obj_desc, info->offset); | ||
| 344 | name = info->name; | ||
| 345 | |||
| 346 | switch (info->opcode) { | ||
| 347 | case ACPI_EXD_INIT: | ||
| 348 | break; | ||
| 349 | |||
| 350 | case ACPI_EXD_TYPE: | ||
| 351 | acpi_ex_out_string("Type", | ||
| 352 | acpi_ut_get_object_type_name | ||
| 353 | (obj_desc)); | ||
| 354 | break; | ||
| 355 | |||
| 356 | case ACPI_EXD_UINT8: | ||
| 357 | |||
| 358 | acpi_os_printf("%20s : %2.2X\n", name, *target); | ||
| 359 | break; | ||
| 360 | |||
| 361 | case ACPI_EXD_UINT16: | ||
| 362 | |||
| 363 | acpi_os_printf("%20s : %4.4X\n", name, | ||
| 364 | ACPI_GET16(target)); | ||
| 365 | break; | ||
| 366 | |||
| 367 | case ACPI_EXD_UINT32: | ||
| 368 | |||
| 369 | acpi_os_printf("%20s : %8.8X\n", name, | ||
| 370 | ACPI_GET32(target)); | ||
| 371 | break; | ||
| 372 | |||
| 373 | case ACPI_EXD_UINT64: | ||
| 374 | |||
| 375 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", | ||
| 376 | ACPI_FORMAT_UINT64(ACPI_GET64(target))); | ||
| 377 | break; | ||
| 378 | |||
| 379 | case ACPI_EXD_POINTER: | ||
| 380 | |||
| 381 | acpi_ex_out_pointer(name, | ||
| 382 | *ACPI_CAST_PTR(void *, target)); | ||
| 383 | break; | ||
| 384 | |||
| 385 | case ACPI_EXD_ADDRESS: | ||
| 386 | |||
| 387 | acpi_ex_out_address(name, | ||
| 388 | *ACPI_CAST_PTR | ||
| 389 | (acpi_physical_address, target)); | ||
| 390 | break; | ||
| 391 | |||
| 392 | case ACPI_EXD_STRING: | ||
| 393 | |||
| 394 | acpi_ut_print_string(obj_desc->string.pointer, | ||
| 395 | ACPI_UINT8_MAX); | ||
| 396 | acpi_os_printf("\n"); | ||
| 397 | break; | ||
| 398 | |||
| 399 | case ACPI_EXD_BUFFER: | ||
| 400 | |||
| 401 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, | ||
| 402 | obj_desc->buffer.length); | ||
| 403 | break; | ||
| 404 | |||
| 405 | case ACPI_EXD_PACKAGE: | ||
| 406 | |||
| 407 | /* Dump the package contents */ | ||
| 408 | |||
| 409 | acpi_os_printf("\nPackage Contents:\n"); | ||
| 410 | acpi_ex_dump_package_obj(obj_desc, 0, 0); | ||
| 411 | break; | ||
| 412 | |||
| 413 | case ACPI_EXD_FIELD: | ||
| 414 | |||
| 415 | acpi_ex_dump_object(obj_desc, | ||
| 416 | acpi_ex_dump_field_common); | ||
| 417 | break; | ||
| 418 | |||
| 419 | case ACPI_EXD_REFERENCE: | ||
| 420 | |||
| 421 | acpi_ex_out_string("Opcode", | ||
| 422 | (acpi_ps_get_opcode_info | ||
| 423 | (obj_desc->reference.opcode))-> | ||
| 424 | name); | ||
| 425 | acpi_ex_dump_reference_obj(obj_desc); | ||
| 426 | break; | ||
| 427 | |||
| 428 | default: | ||
| 429 | acpi_os_printf("**** Invalid table opcode [%X] ****\n", | ||
| 430 | info->opcode); | ||
| 431 | return; | ||
| 432 | } | ||
| 433 | |||
| 434 | info++; | ||
| 435 | count--; | ||
| 436 | } | ||
| 437 | } | ||
| 72 | 438 | ||
| 73 | /******************************************************************************* | 439 | /******************************************************************************* |
| 74 | * | 440 | * |
| @@ -214,7 +580,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 214 | 580 | ||
| 215 | case ACPI_TYPE_BUFFER: | 581 | case ACPI_TYPE_BUFFER: |
| 216 | 582 | ||
| 217 | acpi_os_printf("Buffer len %X @ %p \n", | 583 | acpi_os_printf("Buffer len %X @ %p\n", |
| 218 | obj_desc->buffer.length, | 584 | obj_desc->buffer.length, |
| 219 | obj_desc->buffer.pointer); | 585 | obj_desc->buffer.pointer); |
| 220 | 586 | ||
| @@ -320,17 +686,17 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
| 320 | 686 | ||
| 321 | case ACPI_TYPE_BUFFER_FIELD: | 687 | case ACPI_TYPE_BUFFER_FIELD: |
| 322 | 688 | ||
| 323 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of \n", | 689 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n", |
| 324 | obj_desc->buffer_field.bit_length, | 690 | obj_desc->buffer_field.bit_length, |
| 325 | obj_desc->buffer_field.base_byte_offset, | 691 | obj_desc->buffer_field.base_byte_offset, |
| 326 | obj_desc->buffer_field.start_field_bit_offset); | 692 | obj_desc->buffer_field.start_field_bit_offset); |
| 327 | 693 | ||
| 328 | if (!obj_desc->buffer_field.buffer_obj) { | 694 | if (!obj_desc->buffer_field.buffer_obj) { |
| 329 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL* \n")); | 695 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n")); |
| 330 | } else | 696 | } else |
| 331 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) | 697 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) |
| 332 | != ACPI_TYPE_BUFFER) { | 698 | != ACPI_TYPE_BUFFER) { |
| 333 | acpi_os_printf("*not a Buffer* \n"); | 699 | acpi_os_printf("*not a Buffer*\n"); |
| 334 | } else { | 700 | } else { |
| 335 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, | 701 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, |
| 336 | depth + 1); | 702 | depth + 1); |
| @@ -441,7 +807,6 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
| 441 | return; | 807 | return; |
| 442 | } | 808 | } |
| 443 | 809 | ||
| 444 | #ifdef ACPI_FUTURE_USAGE | ||
| 445 | /******************************************************************************* | 810 | /******************************************************************************* |
| 446 | * | 811 | * |
| 447 | * FUNCTION: acpi_ex_out* functions | 812 | * FUNCTION: acpi_ex_out* functions |
| @@ -465,11 +830,6 @@ static void acpi_ex_out_pointer(char *title, void *value) | |||
| 465 | acpi_os_printf("%20s : %p\n", title, value); | 830 | acpi_os_printf("%20s : %p\n", title, value); |
| 466 | } | 831 | } |
| 467 | 832 | ||
| 468 | static void acpi_ex_out_integer(char *title, u32 value) | ||
| 469 | { | ||
| 470 | acpi_os_printf("%20s : %.2X\n", title, value); | ||
| 471 | } | ||
| 472 | |||
| 473 | static void acpi_ex_out_address(char *title, acpi_physical_address value) | 833 | static void acpi_ex_out_address(char *title, acpi_physical_address value) |
| 474 | { | 834 | { |
| 475 | 835 | ||
| @@ -482,16 +842,16 @@ static void acpi_ex_out_address(char *title, acpi_physical_address value) | |||
| 482 | 842 | ||
| 483 | /******************************************************************************* | 843 | /******************************************************************************* |
| 484 | * | 844 | * |
| 485 | * FUNCTION: acpi_ex_dump_node | 845 | * FUNCTION: acpi_ex_dump_namespace_node |
| 486 | * | 846 | * |
| 487 | * PARAMETERS: *Node - Descriptor to dump | 847 | * PARAMETERS: Node - Descriptor to dump |
| 488 | * Flags - Force display if TRUE | 848 | * Flags - Force display if TRUE |
| 489 | * | 849 | * |
| 490 | * DESCRIPTION: Dumps the members of the given.Node | 850 | * DESCRIPTION: Dumps the members of the given.Node |
| 491 | * | 851 | * |
| 492 | ******************************************************************************/ | 852 | ******************************************************************************/ |
| 493 | 853 | ||
| 494 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | 854 | void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags) |
| 495 | { | 855 | { |
| 496 | 856 | ||
| 497 | ACPI_FUNCTION_ENTRY(); | 857 | ACPI_FUNCTION_ENTRY(); |
| @@ -506,19 +866,17 @@ void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | |||
| 506 | 866 | ||
| 507 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); | 867 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); |
| 508 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); | 868 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); |
| 509 | acpi_ex_out_integer("Flags", node->flags); | ||
| 510 | acpi_ex_out_integer("Owner Id", node->owner_id); | ||
| 511 | acpi_ex_out_integer("Reference Count", node->reference_count); | ||
| 512 | acpi_ex_out_pointer("Attached Object", | 869 | acpi_ex_out_pointer("Attached Object", |
| 513 | acpi_ns_get_attached_object(node)); | 870 | acpi_ns_get_attached_object(node)); |
| 514 | acpi_ex_out_pointer("child_list", node->child); | ||
| 515 | acpi_ex_out_pointer("next_peer", node->peer); | ||
| 516 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); | 871 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); |
| 872 | |||
| 873 | acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node), | ||
| 874 | acpi_ex_dump_node); | ||
| 517 | } | 875 | } |
| 518 | 876 | ||
| 519 | /******************************************************************************* | 877 | /******************************************************************************* |
| 520 | * | 878 | * |
| 521 | * FUNCTION: acpi_ex_dump_reference | 879 | * FUNCTION: acpi_ex_dump_reference_obj |
| 522 | * | 880 | * |
| 523 | * PARAMETERS: Object - Descriptor to dump | 881 | * PARAMETERS: Object - Descriptor to dump |
| 524 | * | 882 | * |
| @@ -526,14 +884,16 @@ void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) | |||
| 526 | * | 884 | * |
| 527 | ******************************************************************************/ | 885 | ******************************************************************************/ |
| 528 | 886 | ||
| 529 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | 887 | static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) |
| 530 | { | 888 | { |
| 531 | struct acpi_buffer ret_buf; | 889 | struct acpi_buffer ret_buf; |
| 532 | acpi_status status; | 890 | acpi_status status; |
| 533 | 891 | ||
| 892 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | ||
| 893 | |||
| 534 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { | 894 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { |
| 535 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); | 895 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); |
| 536 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 896 | |
| 537 | status = | 897 | status = |
| 538 | acpi_ns_handle_to_pathname(obj_desc->reference.node, | 898 | acpi_ns_handle_to_pathname(obj_desc->reference.node, |
| 539 | &ret_buf); | 899 | &ret_buf); |
| @@ -551,9 +911,9 @@ static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | |||
| 551 | 911 | ||
| 552 | /******************************************************************************* | 912 | /******************************************************************************* |
| 553 | * | 913 | * |
| 554 | * FUNCTION: acpi_ex_dump_package | 914 | * FUNCTION: acpi_ex_dump_package_obj |
| 555 | * | 915 | * |
| 556 | * PARAMETERS: Object - Descriptor to dump | 916 | * PARAMETERS: obj_desc - Descriptor to dump |
| 557 | * Level - Indentation Level | 917 | * Level - Indentation Level |
| 558 | * Index - Package index for this object | 918 | * Index - Package index for this object |
| 559 | * | 919 | * |
| @@ -562,7 +922,8 @@ static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) | |||
| 562 | ******************************************************************************/ | 922 | ******************************************************************************/ |
| 563 | 923 | ||
| 564 | static void | 924 | static void |
| 565 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | 925 | acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, |
| 926 | u32 level, u32 index) | ||
| 566 | { | 927 | { |
| 567 | u32 i; | 928 | u32 i; |
| 568 | 929 | ||
| @@ -608,7 +969,8 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
| 608 | acpi_os_printf("[Buffer] Length %.2X = ", | 969 | acpi_os_printf("[Buffer] Length %.2X = ", |
| 609 | obj_desc->buffer.length); | 970 | obj_desc->buffer.length); |
| 610 | if (obj_desc->buffer.length) { | 971 | if (obj_desc->buffer.length) { |
| 611 | acpi_ut_dump_buffer((u8 *) obj_desc->buffer.pointer, | 972 | acpi_ut_dump_buffer(ACPI_CAST_PTR |
| 973 | (u8, obj_desc->buffer.pointer), | ||
| 612 | obj_desc->buffer.length, | 974 | obj_desc->buffer.length, |
| 613 | DB_DWORD_DISPLAY, _COMPONENT); | 975 | DB_DWORD_DISPLAY, _COMPONENT); |
| 614 | } else { | 976 | } else { |
| @@ -618,19 +980,19 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
| 618 | 980 | ||
| 619 | case ACPI_TYPE_PACKAGE: | 981 | case ACPI_TYPE_PACKAGE: |
| 620 | 982 | ||
| 621 | acpi_os_printf("[Package] Contains %d Elements: \n", | 983 | acpi_os_printf("[Package] Contains %d Elements:\n", |
| 622 | obj_desc->package.count); | 984 | obj_desc->package.count); |
| 623 | 985 | ||
| 624 | for (i = 0; i < obj_desc->package.count; i++) { | 986 | for (i = 0; i < obj_desc->package.count; i++) { |
| 625 | acpi_ex_dump_package(obj_desc->package.elements[i], | 987 | acpi_ex_dump_package_obj(obj_desc->package.elements[i], |
| 626 | level + 1, i); | 988 | level + 1, i); |
| 627 | } | 989 | } |
| 628 | break; | 990 | break; |
| 629 | 991 | ||
| 630 | case ACPI_TYPE_LOCAL_REFERENCE: | 992 | case ACPI_TYPE_LOCAL_REFERENCE: |
| 631 | 993 | ||
| 632 | acpi_os_printf("[Object Reference] "); | 994 | acpi_os_printf("[Object Reference] "); |
| 633 | acpi_ex_dump_reference(obj_desc); | 995 | acpi_ex_dump_reference_obj(obj_desc); |
| 634 | break; | 996 | break; |
| 635 | 997 | ||
| 636 | default: | 998 | default: |
| @@ -645,7 +1007,7 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) | |||
| 645 | * | 1007 | * |
| 646 | * FUNCTION: acpi_ex_dump_object_descriptor | 1008 | * FUNCTION: acpi_ex_dump_object_descriptor |
| 647 | * | 1009 | * |
| 648 | * PARAMETERS: Object - Descriptor to dump | 1010 | * PARAMETERS: obj_desc - Descriptor to dump |
| 649 | * Flags - Force display if TRUE | 1011 | * Flags - Force display if TRUE |
| 650 | * | 1012 | * |
| 651 | * DESCRIPTION: Dumps the members of the object descriptor given. | 1013 | * DESCRIPTION: Dumps the members of the object descriptor given. |
| @@ -670,11 +1032,13 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
| 670 | } | 1032 | } |
| 671 | 1033 | ||
| 672 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { | 1034 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { |
| 673 | acpi_ex_dump_node((struct acpi_namespace_node *)obj_desc, | 1035 | acpi_ex_dump_namespace_node((struct acpi_namespace_node *) |
| 674 | flags); | 1036 | obj_desc, flags); |
| 1037 | |||
| 675 | acpi_os_printf("\nAttached Object (%p):\n", | 1038 | acpi_os_printf("\nAttached Object (%p):\n", |
| 676 | ((struct acpi_namespace_node *)obj_desc)-> | 1039 | ((struct acpi_namespace_node *)obj_desc)-> |
| 677 | object); | 1040 | object); |
| 1041 | |||
| 678 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) | 1042 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) |
| 679 | obj_desc)->object, flags); | 1043 | obj_desc)->object, flags); |
| 680 | return_VOID; | 1044 | return_VOID; |
| @@ -687,233 +1051,18 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) | |||
| 687 | return_VOID; | 1051 | return_VOID; |
| 688 | } | 1052 | } |
| 689 | 1053 | ||
| 690 | /* Common Fields */ | 1054 | if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) { |
| 691 | 1055 | return_VOID; | |
| 692 | acpi_ex_out_string("Type", acpi_ut_get_object_type_name(obj_desc)); | 1056 | } |
| 693 | acpi_ex_out_integer("Reference Count", | ||
| 694 | obj_desc->common.reference_count); | ||
| 695 | acpi_ex_out_integer("Flags", obj_desc->common.flags); | ||
| 696 | |||
| 697 | /* Object-specific Fields */ | ||
| 698 | |||
| 699 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
| 700 | case ACPI_TYPE_INTEGER: | ||
| 701 | |||
| 702 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", | ||
| 703 | ACPI_FORMAT_UINT64(obj_desc->integer.value)); | ||
| 704 | break; | ||
| 705 | |||
| 706 | case ACPI_TYPE_STRING: | ||
| 707 | |||
| 708 | acpi_ex_out_integer("Length", obj_desc->string.length); | ||
| 709 | |||
| 710 | acpi_os_printf("%20s : %p ", "Pointer", | ||
| 711 | obj_desc->string.pointer); | ||
| 712 | acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX); | ||
| 713 | acpi_os_printf("\n"); | ||
| 714 | break; | ||
| 715 | |||
| 716 | case ACPI_TYPE_BUFFER: | ||
| 717 | |||
| 718 | acpi_ex_out_integer("Length", obj_desc->buffer.length); | ||
| 719 | acpi_ex_out_pointer("Pointer", obj_desc->buffer.pointer); | ||
| 720 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, | ||
| 721 | obj_desc->buffer.length); | ||
| 722 | break; | ||
| 723 | |||
| 724 | case ACPI_TYPE_PACKAGE: | ||
| 725 | |||
| 726 | acpi_ex_out_integer("Flags", obj_desc->package.flags); | ||
| 727 | acpi_ex_out_integer("Elements", obj_desc->package.count); | ||
| 728 | acpi_ex_out_pointer("Element List", obj_desc->package.elements); | ||
| 729 | |||
| 730 | /* Dump the package contents */ | ||
| 731 | |||
| 732 | acpi_os_printf("\nPackage Contents:\n"); | ||
| 733 | acpi_ex_dump_package(obj_desc, 0, 0); | ||
| 734 | break; | ||
| 735 | |||
| 736 | case ACPI_TYPE_DEVICE: | ||
| 737 | |||
| 738 | acpi_ex_out_pointer("Handler", obj_desc->device.handler); | ||
| 739 | acpi_ex_out_pointer("system_notify", | ||
| 740 | obj_desc->device.system_notify); | ||
| 741 | acpi_ex_out_pointer("device_notify", | ||
| 742 | obj_desc->device.device_notify); | ||
| 743 | break; | ||
| 744 | |||
| 745 | case ACPI_TYPE_EVENT: | ||
| 746 | |||
| 747 | acpi_ex_out_pointer("Semaphore", obj_desc->event.semaphore); | ||
| 748 | break; | ||
| 749 | |||
| 750 | case ACPI_TYPE_METHOD: | ||
| 751 | |||
| 752 | acpi_ex_out_integer("param_count", | ||
| 753 | obj_desc->method.param_count); | ||
| 754 | acpi_ex_out_integer("Concurrency", | ||
| 755 | obj_desc->method.concurrency); | ||
| 756 | acpi_ex_out_pointer("Semaphore", obj_desc->method.semaphore); | ||
| 757 | acpi_ex_out_integer("owner_id", obj_desc->method.owner_id); | ||
| 758 | acpi_ex_out_integer("aml_length", obj_desc->method.aml_length); | ||
| 759 | acpi_ex_out_pointer("aml_start", obj_desc->method.aml_start); | ||
| 760 | break; | ||
| 761 | |||
| 762 | case ACPI_TYPE_MUTEX: | ||
| 763 | |||
| 764 | acpi_ex_out_integer("sync_level", obj_desc->mutex.sync_level); | ||
| 765 | acpi_ex_out_pointer("owner_thread", | ||
| 766 | obj_desc->mutex.owner_thread); | ||
| 767 | acpi_ex_out_integer("acquire_depth", | ||
| 768 | obj_desc->mutex.acquisition_depth); | ||
| 769 | acpi_ex_out_pointer("Semaphore", obj_desc->mutex.semaphore); | ||
| 770 | break; | ||
| 771 | |||
| 772 | case ACPI_TYPE_REGION: | ||
| 773 | |||
| 774 | acpi_ex_out_integer("space_id", obj_desc->region.space_id); | ||
| 775 | acpi_ex_out_integer("Flags", obj_desc->region.flags); | ||
| 776 | acpi_ex_out_address("Address", obj_desc->region.address); | ||
| 777 | acpi_ex_out_integer("Length", obj_desc->region.length); | ||
| 778 | acpi_ex_out_pointer("Handler", obj_desc->region.handler); | ||
| 779 | acpi_ex_out_pointer("Next", obj_desc->region.next); | ||
| 780 | break; | ||
| 781 | |||
| 782 | case ACPI_TYPE_POWER: | ||
| 783 | |||
| 784 | acpi_ex_out_integer("system_level", | ||
| 785 | obj_desc->power_resource.system_level); | ||
| 786 | acpi_ex_out_integer("resource_order", | ||
| 787 | obj_desc->power_resource.resource_order); | ||
| 788 | acpi_ex_out_pointer("system_notify", | ||
| 789 | obj_desc->power_resource.system_notify); | ||
| 790 | acpi_ex_out_pointer("device_notify", | ||
| 791 | obj_desc->power_resource.device_notify); | ||
| 792 | break; | ||
| 793 | |||
| 794 | case ACPI_TYPE_PROCESSOR: | ||
| 795 | |||
| 796 | acpi_ex_out_integer("Processor ID", | ||
| 797 | obj_desc->processor.proc_id); | ||
| 798 | acpi_ex_out_integer("Length", obj_desc->processor.length); | ||
| 799 | acpi_ex_out_address("Address", | ||
| 800 | (acpi_physical_address) obj_desc->processor. | ||
| 801 | address); | ||
| 802 | acpi_ex_out_pointer("system_notify", | ||
| 803 | obj_desc->processor.system_notify); | ||
| 804 | acpi_ex_out_pointer("device_notify", | ||
| 805 | obj_desc->processor.device_notify); | ||
| 806 | acpi_ex_out_pointer("Handler", obj_desc->processor.handler); | ||
| 807 | break; | ||
| 808 | |||
| 809 | case ACPI_TYPE_THERMAL: | ||
| 810 | |||
| 811 | acpi_ex_out_pointer("system_notify", | ||
| 812 | obj_desc->thermal_zone.system_notify); | ||
| 813 | acpi_ex_out_pointer("device_notify", | ||
| 814 | obj_desc->thermal_zone.device_notify); | ||
| 815 | acpi_ex_out_pointer("Handler", obj_desc->thermal_zone.handler); | ||
| 816 | break; | ||
| 817 | |||
| 818 | case ACPI_TYPE_BUFFER_FIELD: | ||
| 819 | case ACPI_TYPE_LOCAL_REGION_FIELD: | ||
| 820 | case ACPI_TYPE_LOCAL_BANK_FIELD: | ||
| 821 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | ||
| 822 | |||
| 823 | acpi_ex_out_integer("field_flags", | ||
| 824 | obj_desc->common_field.field_flags); | ||
| 825 | acpi_ex_out_integer("access_byte_width", | ||
| 826 | obj_desc->common_field.access_byte_width); | ||
| 827 | acpi_ex_out_integer("bit_length", | ||
| 828 | obj_desc->common_field.bit_length); | ||
| 829 | acpi_ex_out_integer("fld_bit_offset", | ||
| 830 | obj_desc->common_field. | ||
| 831 | start_field_bit_offset); | ||
| 832 | acpi_ex_out_integer("base_byte_offset", | ||
| 833 | obj_desc->common_field.base_byte_offset); | ||
| 834 | acpi_ex_out_pointer("parent_node", obj_desc->common_field.node); | ||
| 835 | |||
| 836 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
| 837 | case ACPI_TYPE_BUFFER_FIELD: | ||
| 838 | acpi_ex_out_pointer("buffer_obj", | ||
| 839 | obj_desc->buffer_field.buffer_obj); | ||
| 840 | break; | ||
| 841 | |||
| 842 | case ACPI_TYPE_LOCAL_REGION_FIELD: | ||
| 843 | acpi_ex_out_pointer("region_obj", | ||
| 844 | obj_desc->field.region_obj); | ||
| 845 | break; | ||
| 846 | |||
| 847 | case ACPI_TYPE_LOCAL_BANK_FIELD: | ||
| 848 | acpi_ex_out_integer("Value", | ||
| 849 | obj_desc->bank_field.value); | ||
| 850 | acpi_ex_out_pointer("region_obj", | ||
| 851 | obj_desc->bank_field.region_obj); | ||
| 852 | acpi_ex_out_pointer("bank_obj", | ||
| 853 | obj_desc->bank_field.bank_obj); | ||
| 854 | break; | ||
| 855 | |||
| 856 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | ||
| 857 | acpi_ex_out_integer("Value", | ||
| 858 | obj_desc->index_field.value); | ||
| 859 | acpi_ex_out_pointer("Index", | ||
| 860 | obj_desc->index_field.index_obj); | ||
| 861 | acpi_ex_out_pointer("Data", | ||
| 862 | obj_desc->index_field.data_obj); | ||
| 863 | break; | ||
| 864 | |||
| 865 | default: | ||
| 866 | /* All object types covered above */ | ||
| 867 | break; | ||
| 868 | } | ||
| 869 | break; | ||
| 870 | |||
| 871 | case ACPI_TYPE_LOCAL_REFERENCE: | ||
| 872 | |||
| 873 | acpi_ex_out_integer("target_type", | ||
| 874 | obj_desc->reference.target_type); | ||
| 875 | acpi_ex_out_string("Opcode", | ||
| 876 | (acpi_ps_get_opcode_info | ||
| 877 | (obj_desc->reference.opcode))->name); | ||
| 878 | acpi_ex_out_integer("Offset", obj_desc->reference.offset); | ||
| 879 | acpi_ex_out_pointer("obj_desc", obj_desc->reference.object); | ||
| 880 | acpi_ex_out_pointer("Node", obj_desc->reference.node); | ||
| 881 | acpi_ex_out_pointer("Where", obj_desc->reference.where); | ||
| 882 | |||
| 883 | acpi_ex_dump_reference(obj_desc); | ||
| 884 | break; | ||
| 885 | |||
| 886 | case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: | ||
| 887 | |||
| 888 | acpi_ex_out_integer("space_id", | ||
| 889 | obj_desc->address_space.space_id); | ||
| 890 | acpi_ex_out_pointer("Next", obj_desc->address_space.next); | ||
| 891 | acpi_ex_out_pointer("region_list", | ||
| 892 | obj_desc->address_space.region_list); | ||
| 893 | acpi_ex_out_pointer("Node", obj_desc->address_space.node); | ||
| 894 | acpi_ex_out_pointer("Context", obj_desc->address_space.context); | ||
| 895 | break; | ||
| 896 | 1057 | ||
| 897 | case ACPI_TYPE_LOCAL_NOTIFY: | 1058 | /* Common Fields */ |
| 898 | 1059 | ||
| 899 | acpi_ex_out_pointer("Node", obj_desc->notify.node); | 1060 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_common); |
| 900 | acpi_ex_out_pointer("Context", obj_desc->notify.context); | ||
| 901 | break; | ||
| 902 | 1061 | ||
| 903 | case ACPI_TYPE_LOCAL_ALIAS: | 1062 | /* Object-specific fields */ |
| 904 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: | ||
| 905 | case ACPI_TYPE_LOCAL_EXTRA: | ||
| 906 | case ACPI_TYPE_LOCAL_DATA: | ||
| 907 | default: | ||
| 908 | |||
| 909 | acpi_os_printf | ||
| 910 | ("ex_dump_object_descriptor: Display not implemented for object type %s\n", | ||
| 911 | acpi_ut_get_object_type_name(obj_desc)); | ||
| 912 | break; | ||
| 913 | } | ||
| 914 | 1063 | ||
| 1064 | acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]); | ||
| 915 | return_VOID; | 1065 | return_VOID; |
| 916 | } | 1066 | } |
| 917 | 1067 | ||
| 918 | #endif /* ACPI_FUTURE_USAGE */ | ||
| 919 | #endif | 1068 | #endif |
diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c index ab1ba399aa28..e259201ce9a0 100644 --- a/drivers/acpi/executer/exfield.c +++ b/drivers/acpi/executer/exfield.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -249,13 +249,18 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, | |||
| 249 | * Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE). | 249 | * Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE). |
| 250 | */ | 250 | */ |
| 251 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { | 251 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { |
| 252 | ACPI_REPORT_ERROR(("SMBus write requires Buffer, found type %s\n", acpi_ut_get_object_type_name(source_desc))); | 252 | ACPI_ERROR((AE_INFO, |
| 253 | "SMBus write requires Buffer, found type %s", | ||
| 254 | acpi_ut_get_object_type_name(source_desc))); | ||
| 253 | 255 | ||
| 254 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 256 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 255 | } | 257 | } |
| 256 | 258 | ||
| 257 | if (source_desc->buffer.length < ACPI_SMBUS_BUFFER_SIZE) { | 259 | if (source_desc->buffer.length < ACPI_SMBUS_BUFFER_SIZE) { |
| 258 | ACPI_REPORT_ERROR(("SMBus write requires Buffer of length %X, found length %X\n", ACPI_SMBUS_BUFFER_SIZE, source_desc->buffer.length)); | 260 | ACPI_ERROR((AE_INFO, |
| 261 | "SMBus write requires Buffer of length %X, found length %X", | ||
| 262 | ACPI_SMBUS_BUFFER_SIZE, | ||
| 263 | source_desc->buffer.length)); | ||
| 259 | 264 | ||
| 260 | return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); | 265 | return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); |
| 261 | } | 266 | } |
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c index ba6e08843c29..bd1af35f7fcf 100644 --- a/drivers/acpi/executer/exfldio.c +++ b/drivers/acpi/executer/exfldio.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -94,10 +94,9 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
| 94 | /* We must have a valid region */ | 94 | /* We must have a valid region */ |
| 95 | 95 | ||
| 96 | if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) { | 96 | if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) { |
| 97 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 97 | ACPI_ERROR((AE_INFO, "Needed Region, found type %X (%s)", |
| 98 | "Needed Region, found type %X (%s)\n", | 98 | ACPI_GET_OBJECT_TYPE(rgn_desc), |
| 99 | ACPI_GET_OBJECT_TYPE(rgn_desc), | 99 | acpi_ut_get_object_type_name(rgn_desc))); |
| 100 | acpi_ut_get_object_type_name(rgn_desc))); | ||
| 101 | 100 | ||
| 102 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 101 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 103 | } | 102 | } |
| @@ -162,31 +161,28 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
| 162 | * than the region itself. For example, a region of length one | 161 | * than the region itself. For example, a region of length one |
| 163 | * byte, and a field with Dword access specified. | 162 | * byte, and a field with Dword access specified. |
| 164 | */ | 163 | */ |
| 165 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 164 | ACPI_ERROR((AE_INFO, |
| 166 | "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)\n", | 165 | "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)", |
| 167 | acpi_ut_get_node_name(obj_desc-> | 166 | acpi_ut_get_node_name(obj_desc-> |
| 168 | common_field. | 167 | common_field.node), |
| 169 | node), | 168 | obj_desc->common_field.access_byte_width, |
| 170 | obj_desc->common_field. | 169 | acpi_ut_get_node_name(rgn_desc->region. |
| 171 | access_byte_width, | 170 | node), |
| 172 | acpi_ut_get_node_name(rgn_desc-> | 171 | rgn_desc->region.length)); |
| 173 | region.node), | ||
| 174 | rgn_desc->region.length)); | ||
| 175 | } | 172 | } |
| 176 | 173 | ||
| 177 | /* | 174 | /* |
| 178 | * Offset rounded up to next multiple of field width | 175 | * Offset rounded up to next multiple of field width |
| 179 | * exceeds region length, indicate an error | 176 | * exceeds region length, indicate an error |
| 180 | */ | 177 | */ |
| 181 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 178 | ACPI_ERROR((AE_INFO, |
| 182 | "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)\n", | 179 | "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)", |
| 183 | acpi_ut_get_node_name(obj_desc->common_field. | 180 | acpi_ut_get_node_name(obj_desc->common_field.node), |
| 184 | node), | 181 | obj_desc->common_field.base_byte_offset, |
| 185 | obj_desc->common_field.base_byte_offset, | 182 | field_datum_byte_offset, |
| 186 | field_datum_byte_offset, | 183 | obj_desc->common_field.access_byte_width, |
| 187 | obj_desc->common_field.access_byte_width, | 184 | acpi_ut_get_node_name(rgn_desc->region.node), |
| 188 | acpi_ut_get_node_name(rgn_desc->region.node), | 185 | rgn_desc->region.length)); |
| 189 | rgn_desc->region.length)); | ||
| 190 | 186 | ||
| 191 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); | 187 | return_ACPI_STATUS(AE_AML_REGION_LIMIT); |
| 192 | } | 188 | } |
| @@ -270,18 +266,17 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, | |||
| 270 | 266 | ||
| 271 | if (ACPI_FAILURE(status)) { | 267 | if (ACPI_FAILURE(status)) { |
| 272 | if (status == AE_NOT_IMPLEMENTED) { | 268 | if (status == AE_NOT_IMPLEMENTED) { |
| 273 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 269 | ACPI_ERROR((AE_INFO, |
| 274 | "Region %s(%X) not implemented\n", | 270 | "Region %s(%X) not implemented", |
| 275 | acpi_ut_get_region_name(rgn_desc-> | 271 | acpi_ut_get_region_name(rgn_desc->region. |
| 276 | region. | 272 | space_id), |
| 277 | space_id), | 273 | rgn_desc->region.space_id)); |
| 278 | rgn_desc->region.space_id)); | ||
| 279 | } else if (status == AE_NOT_EXIST) { | 274 | } else if (status == AE_NOT_EXIST) { |
| 280 | ACPI_REPORT_ERROR(("Region %s(%X) has no handler\n", | 275 | ACPI_ERROR((AE_INFO, |
| 281 | acpi_ut_get_region_name(rgn_desc-> | 276 | "Region %s(%X) has no handler", |
| 282 | region. | 277 | acpi_ut_get_region_name(rgn_desc->region. |
| 283 | space_id), | 278 | space_id), |
| 284 | rgn_desc->region.space_id)); | 279 | rgn_desc->region.space_id)); |
| 285 | } | 280 | } |
| 286 | } | 281 | } |
| 287 | 282 | ||
| @@ -514,8 +509,8 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, | |||
| 514 | 509 | ||
| 515 | default: | 510 | default: |
| 516 | 511 | ||
| 517 | ACPI_REPORT_ERROR(("Wrong object type in field I/O %X\n", | 512 | ACPI_ERROR((AE_INFO, "Wrong object type in field I/O %X", |
| 518 | ACPI_GET_OBJECT_TYPE(obj_desc))); | 513 | ACPI_GET_OBJECT_TYPE(obj_desc))); |
| 519 | status = AE_AML_INTERNAL; | 514 | status = AE_AML_INTERNAL; |
| 520 | break; | 515 | break; |
| 521 | } | 516 | } |
| @@ -618,11 +613,11 @@ acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, | |||
| 618 | 613 | ||
| 619 | default: | 614 | default: |
| 620 | 615 | ||
| 621 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 616 | ACPI_ERROR((AE_INFO, |
| 622 | "write_with_update_rule: Unknown update_rule setting: %X\n", | 617 | "Unknown update_rule value: %X", |
| 623 | (obj_desc->common_field. | 618 | (obj_desc->common_field. |
| 624 | field_flags & | 619 | field_flags & |
| 625 | AML_FIELD_UPDATE_RULE_MASK))); | 620 | AML_FIELD_UPDATE_RULE_MASK))); |
| 626 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 621 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
| 627 | } | 622 | } |
| 628 | } | 623 | } |
| @@ -677,10 +672,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc, | |||
| 677 | 672 | ||
| 678 | if (buffer_length < | 673 | if (buffer_length < |
| 679 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { | 674 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { |
| 680 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 675 | ACPI_ERROR((AE_INFO, |
| 681 | "Field size %X (bits) is too large for buffer (%X)\n", | 676 | "Field size %X (bits) is too large for buffer (%X)", |
| 682 | obj_desc->common_field.bit_length, | 677 | obj_desc->common_field.bit_length, buffer_length)); |
| 683 | buffer_length)); | ||
| 684 | 678 | ||
| 685 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 679 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
| 686 | } | 680 | } |
| @@ -792,10 +786,9 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc, | |||
| 792 | 786 | ||
| 793 | if (buffer_length < | 787 | if (buffer_length < |
| 794 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { | 788 | ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->common_field.bit_length)) { |
| 795 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 789 | ACPI_ERROR((AE_INFO, |
| 796 | "Field size %X (bits) is too large for buffer (%X)\n", | 790 | "Field size %X (bits) is too large for buffer (%X)", |
| 797 | obj_desc->common_field.bit_length, | 791 | obj_desc->common_field.bit_length, buffer_length)); |
| 798 | buffer_length)); | ||
| 799 | 792 | ||
| 800 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); | 793 | return_ACPI_STATUS(AE_BUFFER_OVERFLOW); |
| 801 | } | 794 | } |
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c index a3f4d72bedc9..48c18d29222a 100644 --- a/drivers/acpi/executer/exmisc.c +++ b/drivers/acpi/executer/exmisc.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 |
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
| 46 | #include <acpi/acinterp.h> | 46 | #include <acpi/acinterp.h> |
| 47 | #include <acpi/amlcode.h> | 47 | #include <acpi/amlcode.h> |
| 48 | #include <acpi/amlresrc.h> | ||
| 48 | 49 | ||
| 49 | #define _COMPONENT ACPI_EXECUTER | 50 | #define _COMPONENT ACPI_EXECUTER |
| 50 | ACPI_MODULE_NAME("exmisc") | 51 | ACPI_MODULE_NAME("exmisc") |
| @@ -97,7 +98,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
| 97 | 98 | ||
| 98 | default: | 99 | default: |
| 99 | 100 | ||
| 100 | ACPI_REPORT_ERROR(("Unknown Reference opcode in get_reference %X\n", obj_desc->reference.opcode)); | 101 | ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X", |
| 102 | obj_desc->reference.opcode)); | ||
| 101 | return_ACPI_STATUS(AE_AML_INTERNAL); | 103 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 102 | } | 104 | } |
| 103 | break; | 105 | break; |
| @@ -112,7 +114,8 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, | |||
| 112 | 114 | ||
| 113 | default: | 115 | default: |
| 114 | 116 | ||
| 115 | ACPI_REPORT_ERROR(("Invalid descriptor type in get_reference: %X\n", ACPI_GET_DESCRIPTOR_TYPE(obj_desc))); | 117 | ACPI_ERROR((AE_INFO, "Invalid descriptor type %X", |
| 118 | ACPI_GET_DESCRIPTOR_TYPE(obj_desc))); | ||
| 116 | return_ACPI_STATUS(AE_TYPE); | 119 | return_ACPI_STATUS(AE_TYPE); |
| 117 | } | 120 | } |
| 118 | 121 | ||
| @@ -157,48 +160,65 @@ acpi_ex_concat_template(union acpi_operand_object *operand0, | |||
| 157 | union acpi_operand_object **actual_return_desc, | 160 | union acpi_operand_object **actual_return_desc, |
| 158 | struct acpi_walk_state *walk_state) | 161 | struct acpi_walk_state *walk_state) |
| 159 | { | 162 | { |
| 163 | acpi_status status; | ||
| 160 | union acpi_operand_object *return_desc; | 164 | union acpi_operand_object *return_desc; |
| 161 | u8 *new_buf; | 165 | u8 *new_buf; |
| 162 | u8 *end_tag1; | 166 | u8 *end_tag; |
| 163 | u8 *end_tag2; | 167 | acpi_size length0; |
| 164 | acpi_size length1; | 168 | acpi_size length1; |
| 165 | acpi_size length2; | 169 | acpi_size new_length; |
| 166 | 170 | ||
| 167 | ACPI_FUNCTION_TRACE("ex_concat_template"); | 171 | ACPI_FUNCTION_TRACE("ex_concat_template"); |
| 168 | 172 | ||
| 169 | /* Find the end_tags in each resource template */ | 173 | /* |
| 174 | * Find the end_tag descriptor in each resource template. | ||
| 175 | * Note1: returned pointers point TO the end_tag, not past it. | ||
| 176 | * Note2: zero-length buffers are allowed; treated like one end_tag | ||
| 177 | */ | ||
| 178 | |||
| 179 | /* Get the length of the first resource template */ | ||
| 170 | 180 | ||
| 171 | end_tag1 = acpi_ut_get_resource_end_tag(operand0); | 181 | status = acpi_ut_get_resource_end_tag(operand0, &end_tag); |
| 172 | end_tag2 = acpi_ut_get_resource_end_tag(operand1); | 182 | if (ACPI_FAILURE(status)) { |
| 173 | if (!end_tag1 || !end_tag2) { | 183 | return_ACPI_STATUS(status); |
| 174 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | ||
| 175 | } | 184 | } |
| 176 | 185 | ||
| 177 | /* Compute the length of each part */ | 186 | length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer); |
| 187 | |||
| 188 | /* Get the length of the second resource template */ | ||
| 189 | |||
| 190 | status = acpi_ut_get_resource_end_tag(operand1, &end_tag); | ||
| 191 | if (ACPI_FAILURE(status)) { | ||
| 192 | return_ACPI_STATUS(status); | ||
| 193 | } | ||
| 178 | 194 | ||
| 179 | length1 = ACPI_PTR_DIFF(end_tag1, operand0->buffer.pointer); | 195 | length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer); |
| 180 | length2 = ACPI_PTR_DIFF(end_tag2, operand1->buffer.pointer) + 2; /* Size of END_TAG */ | ||
| 181 | 196 | ||
| 182 | /* Create a new buffer object for the result */ | 197 | /* Combine both lengths, minimum size will be 2 for end_tag */ |
| 183 | 198 | ||
| 184 | return_desc = acpi_ut_create_buffer_object(length1 + length2); | 199 | new_length = length0 + length1 + sizeof(struct aml_resource_end_tag); |
| 200 | |||
| 201 | /* Create a new buffer object for the result (with one end_tag) */ | ||
| 202 | |||
| 203 | return_desc = acpi_ut_create_buffer_object(new_length); | ||
| 185 | if (!return_desc) { | 204 | if (!return_desc) { |
| 186 | return_ACPI_STATUS(AE_NO_MEMORY); | 205 | return_ACPI_STATUS(AE_NO_MEMORY); |
| 187 | } | 206 | } |
| 188 | 207 | ||
| 189 | /* Copy the templates to the new descriptor */ | 208 | /* |
| 190 | 209 | * Copy the templates to the new buffer, 0 first, then 1 follows. One | |
| 210 | * end_tag descriptor is copied from Operand1. | ||
| 211 | */ | ||
| 191 | new_buf = return_desc->buffer.pointer; | 212 | new_buf = return_desc->buffer.pointer; |
| 192 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length1); | 213 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, length0); |
| 193 | ACPI_MEMCPY(new_buf + length1, operand1->buffer.pointer, length2); | 214 | ACPI_MEMCPY(new_buf + length0, operand1->buffer.pointer, length1); |
| 194 | 215 | ||
| 195 | /* Compute the new checksum */ | 216 | /* Insert end_tag and set the checksum to zero, means "ignore checksum" */ |
| 196 | 217 | ||
| 197 | new_buf[return_desc->buffer.length - 1] = | 218 | new_buf[new_length - 1] = 0; |
| 198 | acpi_ut_generate_checksum(return_desc->buffer.pointer, | 219 | new_buf[new_length - 2] = ACPI_RESOURCE_NAME_END_TAG | 1; |
| 199 | (return_desc->buffer.length - 1)); | ||
| 200 | 220 | ||
| 201 | /* Return the completed template descriptor */ | 221 | /* Return the completed resource template */ |
| 202 | 222 | ||
| 203 | *actual_return_desc = return_desc; | 223 | *actual_return_desc = return_desc; |
| 204 | return_ACPI_STATUS(AE_OK); | 224 | return_ACPI_STATUS(AE_OK); |
| @@ -229,7 +249,6 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 229 | union acpi_operand_object *return_desc; | 249 | union acpi_operand_object *return_desc; |
| 230 | char *new_buf; | 250 | char *new_buf; |
| 231 | acpi_status status; | 251 | acpi_status status; |
| 232 | acpi_size new_length; | ||
| 233 | 252 | ||
| 234 | ACPI_FUNCTION_TRACE("ex_do_concatenate"); | 253 | ACPI_FUNCTION_TRACE("ex_do_concatenate"); |
| 235 | 254 | ||
| @@ -256,8 +275,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 256 | break; | 275 | break; |
| 257 | 276 | ||
| 258 | default: | 277 | default: |
| 259 | ACPI_REPORT_ERROR(("Concat - invalid obj type: %X\n", | 278 | ACPI_ERROR((AE_INFO, "Invalid object type: %X", |
| 260 | ACPI_GET_OBJECT_TYPE(operand0))); | 279 | ACPI_GET_OBJECT_TYPE(operand0))); |
| 261 | status = AE_AML_INTERNAL; | 280 | status = AE_AML_INTERNAL; |
| 262 | } | 281 | } |
| 263 | 282 | ||
| @@ -296,8 +315,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 296 | 315 | ||
| 297 | /* Copy the first integer, LSB first */ | 316 | /* Copy the first integer, LSB first */ |
| 298 | 317 | ||
| 299 | ACPI_MEMCPY(new_buf, | 318 | ACPI_MEMCPY(new_buf, &operand0->integer.value, |
| 300 | &operand0->integer.value, | ||
| 301 | acpi_gbl_integer_byte_width); | 319 | acpi_gbl_integer_byte_width); |
| 302 | 320 | ||
| 303 | /* Copy the second integer (LSB first) after the first */ | 321 | /* Copy the second integer (LSB first) after the first */ |
| @@ -311,14 +329,11 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 311 | 329 | ||
| 312 | /* Result of two Strings is a String */ | 330 | /* Result of two Strings is a String */ |
| 313 | 331 | ||
| 314 | new_length = (acpi_size) operand0->string.length + | 332 | return_desc = acpi_ut_create_string_object((acpi_size) |
| 315 | (acpi_size) local_operand1->string.length; | 333 | (operand0->string. |
| 316 | if (new_length > ACPI_MAX_STRING_CONVERSION) { | 334 | length + |
| 317 | status = AE_AML_STRING_LIMIT; | 335 | local_operand1-> |
| 318 | goto cleanup; | 336 | string.length)); |
| 319 | } | ||
| 320 | |||
| 321 | return_desc = acpi_ut_create_string_object(new_length); | ||
| 322 | if (!return_desc) { | 337 | if (!return_desc) { |
| 323 | status = AE_NO_MEMORY; | 338 | status = AE_NO_MEMORY; |
| 324 | goto cleanup; | 339 | goto cleanup; |
| @@ -338,11 +353,10 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 338 | /* Result of two Buffers is a Buffer */ | 353 | /* Result of two Buffers is a Buffer */ |
| 339 | 354 | ||
| 340 | return_desc = acpi_ut_create_buffer_object((acpi_size) | 355 | return_desc = acpi_ut_create_buffer_object((acpi_size) |
| 341 | operand0->buffer. | 356 | (operand0->buffer. |
| 342 | length + | 357 | length + |
| 343 | (acpi_size) | 358 | local_operand1-> |
| 344 | local_operand1-> | 359 | buffer.length)); |
| 345 | buffer.length); | ||
| 346 | if (!return_desc) { | 360 | if (!return_desc) { |
| 347 | status = AE_NO_MEMORY; | 361 | status = AE_NO_MEMORY; |
| 348 | goto cleanup; | 362 | goto cleanup; |
| @@ -352,8 +366,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 352 | 366 | ||
| 353 | /* Concatenate the buffers */ | 367 | /* Concatenate the buffers */ |
| 354 | 368 | ||
| 355 | ACPI_MEMCPY(new_buf, | 369 | ACPI_MEMCPY(new_buf, operand0->buffer.pointer, |
| 356 | operand0->buffer.pointer, operand0->buffer.length); | 370 | operand0->buffer.length); |
| 357 | ACPI_MEMCPY(new_buf + operand0->buffer.length, | 371 | ACPI_MEMCPY(new_buf + operand0->buffer.length, |
| 358 | local_operand1->buffer.pointer, | 372 | local_operand1->buffer.pointer, |
| 359 | local_operand1->buffer.length); | 373 | local_operand1->buffer.length); |
| @@ -363,8 +377,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, | |||
| 363 | 377 | ||
| 364 | /* Invalid object type, should not happen here */ | 378 | /* Invalid object type, should not happen here */ |
| 365 | 379 | ||
| 366 | ACPI_REPORT_ERROR(("Concatenate - Invalid object type: %X\n", | 380 | ACPI_ERROR((AE_INFO, "Invalid object type: %X", |
| 367 | ACPI_GET_OBJECT_TYPE(operand0))); | 381 | ACPI_GET_OBJECT_TYPE(operand0))); |
| 368 | status = AE_AML_INTERNAL; | 382 | status = AE_AML_INTERNAL; |
| 369 | goto cleanup; | 383 | goto cleanup; |
| 370 | } | 384 | } |
| @@ -625,9 +639,8 @@ acpi_ex_do_logical_op(u16 opcode, | |||
| 625 | 639 | ||
| 626 | /* Lexicographic compare: compare the data bytes */ | 640 | /* Lexicographic compare: compare the data bytes */ |
| 627 | 641 | ||
| 628 | compare = ACPI_MEMCMP((const char *)operand0->buffer.pointer, | 642 | compare = ACPI_MEMCMP(operand0->buffer.pointer, |
| 629 | (const char *)local_operand1->buffer. | 643 | local_operand1->buffer.pointer, |
| 630 | pointer, | ||
| 631 | (length0 > length1) ? length1 : length0); | 644 | (length0 > length1) ? length1 : length0); |
| 632 | 645 | ||
| 633 | switch (opcode) { | 646 | switch (opcode) { |
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c index ab47f6d8b5c0..f843b22e20b9 100644 --- a/drivers/acpi/executer/exmutex.c +++ b/drivers/acpi/executer/exmutex.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 |
| @@ -153,7 +153,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, | |||
| 153 | /* Sanity check -- we must have a valid thread ID */ | 153 | /* Sanity check -- we must have a valid thread ID */ |
| 154 | 154 | ||
| 155 | if (!walk_state->thread) { | 155 | if (!walk_state->thread) { |
| 156 | ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 156 | ACPI_ERROR((AE_INFO, |
| 157 | "Cannot acquire Mutex [%4.4s], null thread info", | ||
| 158 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
| 157 | return_ACPI_STATUS(AE_AML_INTERNAL); | 159 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 158 | } | 160 | } |
| 159 | 161 | ||
| @@ -162,7 +164,9 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, | |||
| 162 | * mutex. This mechanism provides some deadlock prevention | 164 | * mutex. This mechanism provides some deadlock prevention |
| 163 | */ | 165 | */ |
| 164 | if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { | 166 | if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { |
| 165 | ACPI_REPORT_ERROR(("Cannot acquire Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 167 | ACPI_ERROR((AE_INFO, |
| 168 | "Cannot acquire Mutex [%4.4s], incorrect sync_level", | ||
| 169 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
| 166 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); | 170 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); |
| 167 | } | 171 | } |
| 168 | 172 | ||
| @@ -237,14 +241,18 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
| 237 | /* The mutex must have been previously acquired in order to release it */ | 241 | /* The mutex must have been previously acquired in order to release it */ |
| 238 | 242 | ||
| 239 | if (!obj_desc->mutex.owner_thread) { | 243 | if (!obj_desc->mutex.owner_thread) { |
| 240 | ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], not acquired\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 244 | ACPI_ERROR((AE_INFO, |
| 245 | "Cannot release Mutex [%4.4s], not acquired", | ||
| 246 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
| 241 | return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); | 247 | return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); |
| 242 | } | 248 | } |
| 243 | 249 | ||
| 244 | /* Sanity check -- we must have a valid thread ID */ | 250 | /* Sanity check -- we must have a valid thread ID */ |
| 245 | 251 | ||
| 246 | if (!walk_state->thread) { | 252 | if (!walk_state->thread) { |
| 247 | ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], null thread info\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 253 | ACPI_ERROR((AE_INFO, |
| 254 | "Cannot release Mutex [%4.4s], null thread info", | ||
| 255 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
| 248 | return_ACPI_STATUS(AE_AML_INTERNAL); | 256 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 249 | } | 257 | } |
| 250 | 258 | ||
| @@ -255,7 +263,11 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
| 255 | if ((obj_desc->mutex.owner_thread->thread_id != | 263 | if ((obj_desc->mutex.owner_thread->thread_id != |
| 256 | walk_state->thread->thread_id) | 264 | walk_state->thread->thread_id) |
| 257 | && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { | 265 | && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { |
| 258 | ACPI_REPORT_ERROR(("Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n", walk_state->thread->thread_id, acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.owner_thread->thread_id)); | 266 | ACPI_ERROR((AE_INFO, |
| 267 | "Thread %X cannot release Mutex [%4.4s] acquired by thread %X", | ||
| 268 | walk_state->thread->thread_id, | ||
| 269 | acpi_ut_get_node_name(obj_desc->mutex.node), | ||
| 270 | obj_desc->mutex.owner_thread->thread_id)); | ||
| 259 | return_ACPI_STATUS(AE_AML_NOT_OWNER); | 271 | return_ACPI_STATUS(AE_AML_NOT_OWNER); |
| 260 | } | 272 | } |
| 261 | 273 | ||
| @@ -264,7 +276,9 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
| 264 | * equal to the current sync level | 276 | * equal to the current sync level |
| 265 | */ | 277 | */ |
| 266 | if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { | 278 | if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { |
| 267 | ACPI_REPORT_ERROR(("Cannot release Mutex [%4.4s], incorrect sync_level\n", acpi_ut_get_node_name(obj_desc->mutex.node))); | 279 | ACPI_ERROR((AE_INFO, |
| 280 | "Cannot release Mutex [%4.4s], incorrect sync_level", | ||
| 281 | acpi_ut_get_node_name(obj_desc->mutex.node))); | ||
| 268 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); | 282 | return_ACPI_STATUS(AE_AML_MUTEX_ORDER); |
| 269 | } | 283 | } |
| 270 | 284 | ||
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c index 239d8473e9a5..054fe5e1a314 100644 --- a/drivers/acpi/executer/exnames.c +++ b/drivers/acpi/executer/exnames.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 |
| @@ -99,7 +99,8 @@ static char *acpi_ex_allocate_name_string(u32 prefix_count, u32 num_name_segs) | |||
| 99 | */ | 99 | */ |
| 100 | name_string = ACPI_MEM_ALLOCATE(size_needed); | 100 | name_string = ACPI_MEM_ALLOCATE(size_needed); |
| 101 | if (!name_string) { | 101 | if (!name_string) { |
| 102 | ACPI_REPORT_ERROR(("ex_allocate_name_string: Could not allocate size %d\n", size_needed)); | 102 | ACPI_ERROR((AE_INFO, |
| 103 | "Could not allocate size %d", size_needed)); | ||
| 103 | return_PTR(NULL); | 104 | return_PTR(NULL); |
| 104 | } | 105 | } |
| 105 | 106 | ||
| @@ -167,8 +168,7 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
| 167 | char_buf[0] = *aml_address; | 168 | char_buf[0] = *aml_address; |
| 168 | 169 | ||
| 169 | if ('0' <= char_buf[0] && char_buf[0] <= '9') { | 170 | if ('0' <= char_buf[0] && char_buf[0] <= '9') { |
| 170 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "leading digit: %c\n", | 171 | ACPI_ERROR((AE_INFO, "Invalid leading digit: %c", char_buf[0])); |
| 171 | char_buf[0])); | ||
| 172 | return_ACPI_STATUS(AE_CTRL_PENDING); | 172 | return_ACPI_STATUS(AE_CTRL_PENDING); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| @@ -191,10 +191,10 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
| 191 | if (name_string) { | 191 | if (name_string) { |
| 192 | ACPI_STRCAT(name_string, char_buf); | 192 | ACPI_STRCAT(name_string, char_buf); |
| 193 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 193 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 194 | "Appended to - %s \n", name_string)); | 194 | "Appended to - %s\n", name_string)); |
| 195 | } else { | 195 | } else { |
| 196 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 196 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
| 197 | "No Name string - %s \n", char_buf)); | 197 | "No Name string - %s\n", char_buf)); |
| 198 | } | 198 | } |
| 199 | } else if (index == 0) { | 199 | } else if (index == 0) { |
| 200 | /* | 200 | /* |
| @@ -211,12 +211,12 @@ static acpi_status acpi_ex_name_segment(u8 ** in_aml_address, char *name_string) | |||
| 211 | * the required 4 | 211 | * the required 4 |
| 212 | */ | 212 | */ |
| 213 | status = AE_AML_BAD_NAME; | 213 | status = AE_AML_BAD_NAME; |
| 214 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 214 | ACPI_ERROR((AE_INFO, |
| 215 | "Bad character %02x in name, at %p\n", | 215 | "Bad character %02x in name, at %p", |
| 216 | *aml_address, aml_address)); | 216 | *aml_address, aml_address)); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | *in_aml_address = (u8 *) aml_address; | 219 | *in_aml_address = ACPI_CAST_PTR(u8, aml_address); |
| 220 | return_ACPI_STATUS(status); | 220 | return_ACPI_STATUS(status); |
| 221 | } | 221 | } |
| 222 | 222 | ||
| @@ -412,8 +412,7 @@ acpi_ex_get_name_string(acpi_object_type data_type, | |||
| 412 | if (AE_CTRL_PENDING == status && has_prefix) { | 412 | if (AE_CTRL_PENDING == status && has_prefix) { |
| 413 | /* Ran out of segments after processing a prefix */ | 413 | /* Ran out of segments after processing a prefix */ |
| 414 | 414 | ||
| 415 | ACPI_REPORT_ERROR(("ex_do_name: Malformed Name at %p\n", | 415 | ACPI_ERROR((AE_INFO, "Malformed Name at %p", name_string)); |
| 416 | name_string)); | ||
| 417 | status = AE_AML_BAD_NAME; | 416 | status = AE_AML_BAD_NAME; |
| 418 | } | 417 | } |
| 419 | 418 | ||
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 97e34542f5e4..23d0823bcd5e 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.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 |
| @@ -111,7 +111,8 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 111 | 111 | ||
| 112 | default: /* Unknown opcode */ | 112 | default: /* Unknown opcode */ |
| 113 | 113 | ||
| 114 | ACPI_REPORT_ERROR(("acpi_ex_opcode_0A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 114 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 115 | walk_state->opcode)); | ||
| 115 | status = AE_AML_BAD_OPCODE; | 116 | status = AE_AML_BAD_OPCODE; |
| 116 | break; | 117 | break; |
| 117 | } | 118 | } |
| @@ -188,7 +189,8 @@ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) | |||
| 188 | 189 | ||
| 189 | default: /* Unknown opcode */ | 190 | default: /* Unknown opcode */ |
| 190 | 191 | ||
| 191 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 192 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 193 | walk_state->opcode)); | ||
| 192 | status = AE_AML_BAD_OPCODE; | 194 | status = AE_AML_BAD_OPCODE; |
| 193 | break; | 195 | break; |
| 194 | } | 196 | } |
| @@ -227,7 +229,8 @@ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) | |||
| 227 | 229 | ||
| 228 | default: /* Unknown opcode */ | 230 | default: /* Unknown opcode */ |
| 229 | 231 | ||
| 230 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_1T_0R: Unknown opcode %X\n", walk_state->opcode)); | 232 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 233 | walk_state->opcode)); | ||
| 231 | status = AE_AML_BAD_OPCODE; | 234 | status = AE_AML_BAD_OPCODE; |
| 232 | goto cleanup; | 235 | goto cleanup; |
| 233 | } | 236 | } |
| @@ -346,9 +349,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 346 | /* Check the range of the digit */ | 349 | /* Check the range of the digit */ |
| 347 | 350 | ||
| 348 | if (temp32 > 9) { | 351 | if (temp32 > 9) { |
| 349 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 352 | ACPI_ERROR((AE_INFO, |
| 350 | "BCD digit too large (not decimal): 0x%X\n", | 353 | "BCD digit too large (not decimal): 0x%X", |
| 351 | temp32)); | 354 | temp32)); |
| 352 | 355 | ||
| 353 | status = AE_AML_NUMERIC_OVERFLOW; | 356 | status = AE_AML_NUMERIC_OVERFLOW; |
| 354 | goto cleanup; | 357 | goto cleanup; |
| @@ -393,12 +396,10 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 393 | /* Overflow if there is any data left in Digit */ | 396 | /* Overflow if there is any data left in Digit */ |
| 394 | 397 | ||
| 395 | if (digit > 0) { | 398 | if (digit > 0) { |
| 396 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 399 | ACPI_ERROR((AE_INFO, |
| 397 | "Integer too large to convert to BCD: %8.8X%8.8X\n", | 400 | "Integer too large to convert to BCD: %8.8X%8.8X", |
| 398 | ACPI_FORMAT_UINT64(operand | 401 | ACPI_FORMAT_UINT64(operand[0]-> |
| 399 | [0]-> | 402 | integer.value))); |
| 400 | integer. | ||
| 401 | value))); | ||
| 402 | status = AE_AML_NUMERIC_OVERFLOW; | 403 | status = AE_AML_NUMERIC_OVERFLOW; |
| 403 | goto cleanup; | 404 | goto cleanup; |
| 404 | } | 405 | } |
| @@ -525,15 +526,16 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 525 | 526 | ||
| 526 | /* These are two obsolete opcodes */ | 527 | /* These are two obsolete opcodes */ |
| 527 | 528 | ||
| 528 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 529 | ACPI_ERROR((AE_INFO, |
| 529 | "%s is obsolete and not implemented\n", | 530 | "%s is obsolete and not implemented", |
| 530 | acpi_ps_get_opcode_name(walk_state->opcode))); | 531 | acpi_ps_get_opcode_name(walk_state->opcode))); |
| 531 | status = AE_SUPPORT; | 532 | status = AE_SUPPORT; |
| 532 | goto cleanup; | 533 | goto cleanup; |
| 533 | 534 | ||
| 534 | default: /* Unknown opcode */ | 535 | default: /* Unknown opcode */ |
| 535 | 536 | ||
| 536 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_1T_1R: Unknown opcode %X\n", walk_state->opcode)); | 537 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 538 | walk_state->opcode)); | ||
| 537 | status = AE_AML_BAD_OPCODE; | 539 | status = AE_AML_BAD_OPCODE; |
| 538 | goto cleanup; | 540 | goto cleanup; |
| 539 | } | 541 | } |
| @@ -639,11 +641,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 639 | acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, | 641 | acpi_ex_resolve_operands(AML_LNOT_OP, &temp_desc, |
| 640 | walk_state); | 642 | walk_state); |
| 641 | if (ACPI_FAILURE(status)) { | 643 | if (ACPI_FAILURE(status)) { |
| 642 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 644 | ACPI_EXCEPTION((AE_INFO, status, |
| 643 | "%s: bad operand(s) %s\n", | 645 | "While resolving operands for [%s]", |
| 644 | acpi_ps_get_opcode_name(walk_state-> | 646 | acpi_ps_get_opcode_name(walk_state-> |
| 645 | opcode), | 647 | opcode))); |
| 646 | acpi_format_exception(status))); | ||
| 647 | 648 | ||
| 648 | goto cleanup; | 649 | goto cleanup; |
| 649 | } | 650 | } |
| @@ -742,9 +743,9 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 742 | break; | 743 | break; |
| 743 | 744 | ||
| 744 | default: | 745 | default: |
| 745 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 746 | ACPI_ERROR((AE_INFO, |
| 746 | "size_of - Operand is not Buf/Int/Str/Pkg - found type %s\n", | 747 | "Operand is not Buf/Int/Str/Pkg - found type %s", |
| 747 | acpi_ut_get_type_name(type))); | 748 | acpi_ut_get_type_name(type))); |
| 748 | status = AE_AML_OPERAND_TYPE; | 749 | status = AE_AML_OPERAND_TYPE; |
| 749 | goto cleanup; | 750 | goto cleanup; |
| 750 | } | 751 | } |
| @@ -941,11 +942,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 941 | 942 | ||
| 942 | default: | 943 | default: |
| 943 | 944 | ||
| 944 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 945 | ACPI_ERROR((AE_INFO, |
| 945 | "Unknown Index target_type %X in obj %p\n", | 946 | "Unknown Index target_type %X in obj %p", |
| 946 | operand[0]->reference. | 947 | operand[0]->reference. |
| 947 | target_type, | 948 | target_type, operand[0])); |
| 948 | operand[0])); | ||
| 949 | status = AE_AML_OPERAND_TYPE; | 949 | status = AE_AML_OPERAND_TYPE; |
| 950 | goto cleanup; | 950 | goto cleanup; |
| 951 | } | 951 | } |
| @@ -971,11 +971,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 971 | break; | 971 | break; |
| 972 | 972 | ||
| 973 | default: | 973 | default: |
| 974 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 974 | ACPI_ERROR((AE_INFO, |
| 975 | "Unknown opcode in ref(%p) - %X\n", | 975 | "Unknown opcode in ref(%p) - %X", |
| 976 | operand[0], | 976 | operand[0], |
| 977 | operand[0]->reference. | 977 | operand[0]->reference.opcode)); |
| 978 | opcode)); | ||
| 979 | 978 | ||
| 980 | status = AE_TYPE; | 979 | status = AE_TYPE; |
| 981 | goto cleanup; | 980 | goto cleanup; |
| @@ -985,7 +984,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 985 | 984 | ||
| 986 | default: | 985 | default: |
| 987 | 986 | ||
| 988 | ACPI_REPORT_ERROR(("acpi_ex_opcode_1A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 987 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 988 | walk_state->opcode)); | ||
| 989 | status = AE_AML_BAD_OPCODE; | 989 | status = AE_AML_BAD_OPCODE; |
| 990 | goto cleanup; | 990 | goto cleanup; |
| 991 | } | 991 | } |
diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c index 8d70c6beef00..e263a5ddd405 100644 --- a/drivers/acpi/executer/exoparg2.c +++ b/drivers/acpi/executer/exoparg2.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -111,9 +111,9 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) | |||
| 111 | /* Are notifies allowed on this object? */ | 111 | /* Are notifies allowed on this object? */ |
| 112 | 112 | ||
| 113 | if (!acpi_ev_is_notify_object(node)) { | 113 | if (!acpi_ev_is_notify_object(node)) { |
| 114 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 114 | ACPI_ERROR((AE_INFO, |
| 115 | "Unexpected notify object type [%s]\n", | 115 | "Unexpected notify object type [%s]", |
| 116 | acpi_ut_get_type_name(node->type))); | 116 | acpi_ut_get_type_name(node->type))); |
| 117 | 117 | ||
| 118 | status = AE_AML_OPERAND_TYPE; | 118 | status = AE_AML_OPERAND_TYPE; |
| 119 | break; | 119 | break; |
| @@ -157,7 +157,8 @@ acpi_status acpi_ex_opcode_2A_0T_0R(struct acpi_walk_state *walk_state) | |||
| 157 | 157 | ||
| 158 | default: | 158 | default: |
| 159 | 159 | ||
| 160 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 160 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 161 | walk_state->opcode)); | ||
| 161 | status = AE_AML_BAD_OPCODE; | 162 | status = AE_AML_BAD_OPCODE; |
| 162 | } | 163 | } |
| 163 | 164 | ||
| @@ -221,7 +222,8 @@ acpi_status acpi_ex_opcode_2A_2T_1R(struct acpi_walk_state *walk_state) | |||
| 221 | 222 | ||
| 222 | default: | 223 | default: |
| 223 | 224 | ||
| 224 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_2T_1R: Unknown opcode %X\n", walk_state->opcode)); | 225 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 226 | walk_state->opcode)); | ||
| 225 | status = AE_AML_BAD_OPCODE; | 227 | status = AE_AML_BAD_OPCODE; |
| 226 | goto cleanup; | 228 | goto cleanup; |
| 227 | } | 229 | } |
| @@ -344,10 +346,6 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 344 | (length < operand[1]->integer.value) && | 346 | (length < operand[1]->integer.value) && |
| 345 | (operand[0]->buffer.pointer[length])) { | 347 | (operand[0]->buffer.pointer[length])) { |
| 346 | length++; | 348 | length++; |
| 347 | if (length > ACPI_MAX_STRING_CONVERSION) { | ||
| 348 | status = AE_AML_STRING_LIMIT; | ||
| 349 | goto cleanup; | ||
| 350 | } | ||
| 351 | } | 349 | } |
| 352 | 350 | ||
| 353 | /* Allocate a new string object */ | 351 | /* Allocate a new string object */ |
| @@ -358,8 +356,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 358 | goto cleanup; | 356 | goto cleanup; |
| 359 | } | 357 | } |
| 360 | 358 | ||
| 361 | /* Copy the raw buffer data with no transform. NULL terminated already */ | 359 | /* |
| 362 | 360 | * Copy the raw buffer data with no transform. | |
| 361 | * (NULL terminated already) | ||
| 362 | */ | ||
| 363 | ACPI_MEMCPY(return_desc->string.pointer, | 363 | ACPI_MEMCPY(return_desc->string.pointer, |
| 364 | operand[0]->buffer.pointer, length); | 364 | operand[0]->buffer.pointer, length); |
| 365 | break; | 365 | break; |
| @@ -391,10 +391,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 391 | /* Object to be indexed is a Package */ | 391 | /* Object to be indexed is a Package */ |
| 392 | 392 | ||
| 393 | if (index >= operand[0]->package.count) { | 393 | if (index >= operand[0]->package.count) { |
| 394 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 394 | ACPI_ERROR((AE_INFO, |
| 395 | "Index value (%X%8.8X) beyond package end (%X)\n", | 395 | "Index value (%X%8.8X) beyond package end (%X)", |
| 396 | ACPI_FORMAT_UINT64(index), | 396 | ACPI_FORMAT_UINT64(index), |
| 397 | operand[0]->package.count)); | 397 | operand[0]->package.count)); |
| 398 | status = AE_AML_PACKAGE_LIMIT; | 398 | status = AE_AML_PACKAGE_LIMIT; |
| 399 | goto cleanup; | 399 | goto cleanup; |
| 400 | } | 400 | } |
| @@ -407,10 +407,10 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 407 | /* Object to be indexed is a Buffer/String */ | 407 | /* Object to be indexed is a Buffer/String */ |
| 408 | 408 | ||
| 409 | if (index >= operand[0]->buffer.length) { | 409 | if (index >= operand[0]->buffer.length) { |
| 410 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 410 | ACPI_ERROR((AE_INFO, |
| 411 | "Index value (%X%8.8X) beyond end of buffer (%X)\n", | 411 | "Index value (%X%8.8X) beyond end of buffer (%X)", |
| 412 | ACPI_FORMAT_UINT64(index), | 412 | ACPI_FORMAT_UINT64(index), |
| 413 | operand[0]->buffer.length)); | 413 | operand[0]->buffer.length)); |
| 414 | status = AE_AML_BUFFER_LIMIT; | 414 | status = AE_AML_BUFFER_LIMIT; |
| 415 | goto cleanup; | 415 | goto cleanup; |
| 416 | } | 416 | } |
| @@ -442,7 +442,8 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 442 | 442 | ||
| 443 | default: | 443 | default: |
| 444 | 444 | ||
| 445 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_1T_1R: Unknown opcode %X\n", walk_state->opcode)); | 445 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 446 | walk_state->opcode)); | ||
| 446 | status = AE_AML_BAD_OPCODE; | 447 | status = AE_AML_BAD_OPCODE; |
| 447 | break; | 448 | break; |
| 448 | } | 449 | } |
| @@ -546,7 +547,8 @@ acpi_status acpi_ex_opcode_2A_0T_1R(struct acpi_walk_state *walk_state) | |||
| 546 | 547 | ||
| 547 | default: | 548 | default: |
| 548 | 549 | ||
| 549 | ACPI_REPORT_ERROR(("acpi_ex_opcode_2A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 550 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 551 | walk_state->opcode)); | ||
| 550 | status = AE_AML_BAD_OPCODE; | 552 | status = AE_AML_BAD_OPCODE; |
| 551 | goto cleanup; | 553 | goto cleanup; |
| 552 | } | 554 | } |
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c index 483365777670..6a3a883cb8a3 100644 --- a/drivers/acpi/executer/exoparg3.c +++ b/drivers/acpi/executer/exoparg3.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 |
| @@ -119,7 +119,8 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state) | |||
| 119 | 119 | ||
| 120 | default: | 120 | default: |
| 121 | 121 | ||
| 122 | ACPI_REPORT_ERROR(("acpi_ex_opcode_3A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 122 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 123 | walk_state->opcode)); | ||
| 123 | status = AE_AML_BAD_OPCODE; | 124 | status = AE_AML_BAD_OPCODE; |
| 124 | goto cleanup; | 125 | goto cleanup; |
| 125 | } | 126 | } |
| @@ -223,8 +224,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 223 | goto cleanup; | 224 | goto cleanup; |
| 224 | } | 225 | } |
| 225 | 226 | ||
| 226 | if (length > 0) { | 227 | if (buffer) { |
| 227 | /* Copy the portion requested */ | 228 | /* We have a buffer, copy the portion requested */ |
| 228 | 229 | ||
| 229 | ACPI_MEMCPY(buffer, operand[0]->string.pointer + index, | 230 | ACPI_MEMCPY(buffer, operand[0]->string.pointer + index, |
| 230 | length); | 231 | length); |
| @@ -242,7 +243,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) | |||
| 242 | 243 | ||
| 243 | default: | 244 | default: |
| 244 | 245 | ||
| 245 | ACPI_REPORT_ERROR(("acpi_ex_opcode_3A_0T_0R: Unknown opcode %X\n", walk_state->opcode)); | 246 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 247 | walk_state->opcode)); | ||
| 246 | status = AE_AML_BAD_OPCODE; | 248 | status = AE_AML_BAD_OPCODE; |
| 247 | goto cleanup; | 249 | goto cleanup; |
| 248 | } | 250 | } |
diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c index 5dee77139576..e043d924444f 100644 --- a/drivers/acpi/executer/exoparg6.c +++ b/drivers/acpi/executer/exoparg6.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 |
| @@ -234,8 +234,7 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
| 234 | 234 | ||
| 235 | if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || | 235 | if ((operand[1]->integer.value > MAX_MATCH_OPERATOR) || |
| 236 | (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { | 236 | (operand[3]->integer.value > MAX_MATCH_OPERATOR)) { |
| 237 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 237 | ACPI_ERROR((AE_INFO, "Match operator out of range")); |
| 238 | "Match operator out of range\n")); | ||
| 239 | status = AE_AML_OPERAND_VALUE; | 238 | status = AE_AML_OPERAND_VALUE; |
| 240 | goto cleanup; | 239 | goto cleanup; |
| 241 | } | 240 | } |
| @@ -244,10 +243,10 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
| 244 | 243 | ||
| 245 | index = operand[5]->integer.value; | 244 | index = operand[5]->integer.value; |
| 246 | if (index >= operand[0]->package.count) { | 245 | if (index >= operand[0]->package.count) { |
| 247 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 246 | ACPI_ERROR((AE_INFO, |
| 248 | "Index (%X%8.8X) beyond package end (%X)\n", | 247 | "Index (%X%8.8X) beyond package end (%X)", |
| 249 | ACPI_FORMAT_UINT64(index), | 248 | ACPI_FORMAT_UINT64(index), |
| 250 | operand[0]->package.count)); | 249 | operand[0]->package.count)); |
| 251 | status = AE_AML_PACKAGE_LIMIT; | 250 | status = AE_AML_PACKAGE_LIMIT; |
| 252 | goto cleanup; | 251 | goto cleanup; |
| 253 | } | 252 | } |
| @@ -316,7 +315,8 @@ acpi_status acpi_ex_opcode_6A_0T_1R(struct acpi_walk_state * walk_state) | |||
| 316 | 315 | ||
| 317 | default: | 316 | default: |
| 318 | 317 | ||
| 319 | ACPI_REPORT_ERROR(("acpi_ex_opcode_6A_0T_1R: Unknown opcode %X\n", walk_state->opcode)); | 318 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", |
| 319 | walk_state->opcode)); | ||
| 320 | status = AE_AML_BAD_OPCODE; | 320 | status = AE_AML_BAD_OPCODE; |
| 321 | goto cleanup; | 321 | goto cleanup; |
| 322 | } | 322 | } |
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c index 7476c363e407..7719ae5d4f16 100644 --- a/drivers/acpi/executer/exprep.c +++ b/drivers/acpi/executer/exprep.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 |
| @@ -274,9 +274,8 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
| 274 | default: | 274 | default: |
| 275 | /* Invalid field access type */ | 275 | /* Invalid field access type */ |
| 276 | 276 | ||
| 277 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 277 | ACPI_ERROR((AE_INFO, "Unknown field access type %X", access)); |
| 278 | "Unknown field access type %X\n", access)); | 278 | return_UINT32(0); |
| 279 | return_VALUE(0); | ||
| 280 | } | 279 | } |
| 281 | 280 | ||
| 282 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { | 281 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { |
| @@ -289,7 +288,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, | |||
| 289 | } | 288 | } |
| 290 | 289 | ||
| 291 | *return_byte_alignment = byte_alignment; | 290 | *return_byte_alignment = byte_alignment; |
| 292 | return_VALUE(bit_length); | 291 | return_UINT32(bit_length); |
| 293 | } | 292 | } |
| 294 | 293 | ||
| 295 | /******************************************************************************* | 294 | /******************************************************************************* |
| @@ -422,15 +421,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
| 422 | 421 | ||
| 423 | if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { | 422 | if (info->field_type != ACPI_TYPE_LOCAL_INDEX_FIELD) { |
| 424 | if (!info->region_node) { | 423 | if (!info->region_node) { |
| 425 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null region_node\n")); | 424 | ACPI_ERROR((AE_INFO, "Null region_node")); |
| 426 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 425 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
| 427 | } | 426 | } |
| 428 | 427 | ||
| 429 | type = acpi_ns_get_type(info->region_node); | 428 | type = acpi_ns_get_type(info->region_node); |
| 430 | if (type != ACPI_TYPE_REGION) { | 429 | if (type != ACPI_TYPE_REGION) { |
| 431 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 430 | ACPI_ERROR((AE_INFO, |
| 432 | "Needed Region, found type %X (%s)\n", | 431 | "Needed Region, found type %X (%s)", |
| 433 | type, acpi_ut_get_type_name(type))); | 432 | type, acpi_ut_get_type_name(type))); |
| 434 | 433 | ||
| 435 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 434 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 436 | } | 435 | } |
| @@ -499,17 +498,17 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
| 499 | 498 | ||
| 500 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | 499 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
| 501 | 500 | ||
| 501 | /* Get the Index and Data registers */ | ||
| 502 | |||
| 502 | obj_desc->index_field.index_obj = | 503 | obj_desc->index_field.index_obj = |
| 503 | acpi_ns_get_attached_object(info->register_node); | 504 | acpi_ns_get_attached_object(info->register_node); |
| 504 | obj_desc->index_field.data_obj = | 505 | obj_desc->index_field.data_obj = |
| 505 | acpi_ns_get_attached_object(info->data_register_node); | 506 | acpi_ns_get_attached_object(info->data_register_node); |
| 506 | obj_desc->index_field.value = (u32) | ||
| 507 | (info->field_bit_position / | ||
| 508 | ACPI_MUL_8(obj_desc->field.access_byte_width)); | ||
| 509 | 507 | ||
| 510 | if (!obj_desc->index_field.data_obj | 508 | if (!obj_desc->index_field.data_obj |
| 511 | || !obj_desc->index_field.index_obj) { | 509 | || !obj_desc->index_field.index_obj) { |
| 512 | ACPI_REPORT_ERROR(("Null Index Object during field prep\n")); | 510 | ACPI_ERROR((AE_INFO, |
| 511 | "Null Index Object during field prep")); | ||
| 513 | acpi_ut_delete_object_desc(obj_desc); | 512 | acpi_ut_delete_object_desc(obj_desc); |
| 514 | return_ACPI_STATUS(AE_AML_INTERNAL); | 513 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 515 | } | 514 | } |
| @@ -519,6 +518,15 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) | |||
| 519 | acpi_ut_add_reference(obj_desc->index_field.data_obj); | 518 | acpi_ut_add_reference(obj_desc->index_field.data_obj); |
| 520 | acpi_ut_add_reference(obj_desc->index_field.index_obj); | 519 | acpi_ut_add_reference(obj_desc->index_field.index_obj); |
| 521 | 520 | ||
| 521 | /* | ||
| 522 | * The value written to the Index register is the byte offset of the | ||
| 523 | * target field | ||
| 524 | * Note: may change code to: ACPI_DIV_8 (Info->field_bit_position) | ||
| 525 | */ | ||
| 526 | obj_desc->index_field.value = (u32) | ||
| 527 | (info->field_bit_position / | ||
| 528 | ACPI_MUL_8(obj_desc->field.access_byte_width)); | ||
| 529 | |||
| 522 | ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, | 530 | ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, |
| 523 | "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", | 531 | "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", |
| 524 | obj_desc->index_field.start_field_bit_offset, | 532 | obj_desc->index_field.start_field_bit_offset, |
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c index 9a2f5bea3afe..6a4cfdff606d 100644 --- a/drivers/acpi/executer/exregion.c +++ b/drivers/acpi/executer/exregion.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 |
| @@ -77,7 +77,7 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
| 77 | struct acpi_mem_space_context *mem_info = region_context; | 77 | struct acpi_mem_space_context *mem_info = region_context; |
| 78 | u32 length; | 78 | u32 length; |
| 79 | acpi_size window_size; | 79 | acpi_size window_size; |
| 80 | #ifndef ACPI_MISALIGNED_TRANSFERS | 80 | #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED |
| 81 | u32 remainder; | 81 | u32 remainder; |
| 82 | #endif | 82 | #endif |
| 83 | 83 | ||
| @@ -103,13 +103,12 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
| 103 | break; | 103 | break; |
| 104 | 104 | ||
| 105 | default: | 105 | default: |
| 106 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 106 | ACPI_ERROR((AE_INFO, "Invalid system_memory width %d", |
| 107 | "Invalid system_memory width %d\n", | 107 | bit_width)); |
| 108 | bit_width)); | ||
| 109 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); | 108 | return_ACPI_STATUS(AE_AML_OPERAND_VALUE); |
| 110 | } | 109 | } |
| 111 | 110 | ||
| 112 | #ifndef ACPI_MISALIGNED_TRANSFERS | 111 | #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED |
| 113 | /* | 112 | /* |
| 114 | * Hardware does not support non-aligned data transfers, we must verify | 113 | * Hardware does not support non-aligned data transfers, we must verify |
| 115 | * the request. | 114 | * the request. |
| @@ -159,10 +158,10 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
| 159 | (void **)&mem_info-> | 158 | (void **)&mem_info-> |
| 160 | mapped_logical_address); | 159 | mapped_logical_address); |
| 161 | if (ACPI_FAILURE(status)) { | 160 | if (ACPI_FAILURE(status)) { |
| 162 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 161 | ACPI_ERROR((AE_INFO, |
| 163 | "Could not map memory at %8.8X%8.8X, size %X\n", | 162 | "Could not map memory at %8.8X%8.8X, size %X", |
| 164 | ACPI_FORMAT_UINT64(address), | 163 | ACPI_FORMAT_UINT64(address), |
| 165 | (u32) window_size)); | 164 | (u32) window_size)); |
| 166 | mem_info->mapped_length = 0; | 165 | mem_info->mapped_length = 0; |
| 167 | return_ACPI_STATUS(status); | 166 | return_ACPI_STATUS(status); |
| 168 | } | 167 | } |
| @@ -199,20 +198,20 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
| 199 | *value = 0; | 198 | *value = 0; |
| 200 | switch (bit_width) { | 199 | switch (bit_width) { |
| 201 | case 8: | 200 | case 8: |
| 202 | *value = (acpi_integer) * ((u8 *) logical_addr_ptr); | 201 | *value = (acpi_integer) ACPI_GET8(logical_addr_ptr); |
| 203 | break; | 202 | break; |
| 204 | 203 | ||
| 205 | case 16: | 204 | case 16: |
| 206 | *value = (acpi_integer) * ((u16 *) logical_addr_ptr); | 205 | *value = (acpi_integer) ACPI_GET16(logical_addr_ptr); |
| 207 | break; | 206 | break; |
| 208 | 207 | ||
| 209 | case 32: | 208 | case 32: |
| 210 | *value = (acpi_integer) * ((u32 *) logical_addr_ptr); | 209 | *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); |
| 211 | break; | 210 | break; |
| 212 | 211 | ||
| 213 | #if ACPI_MACHINE_WIDTH != 16 | 212 | #if ACPI_MACHINE_WIDTH != 16 |
| 214 | case 64: | 213 | case 64: |
| 215 | *value = (acpi_integer) * ((u64 *) logical_addr_ptr); | 214 | *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); |
| 216 | break; | 215 | break; |
| 217 | #endif | 216 | #endif |
| 218 | default: | 217 | default: |
| @@ -225,20 +224,20 @@ acpi_ex_system_memory_space_handler(u32 function, | |||
| 225 | 224 | ||
| 226 | switch (bit_width) { | 225 | switch (bit_width) { |
| 227 | case 8: | 226 | case 8: |
| 228 | *(u8 *) logical_addr_ptr = (u8) * value; | 227 | ACPI_SET8(logical_addr_ptr) = (u8) * value; |
| 229 | break; | 228 | break; |
| 230 | 229 | ||
| 231 | case 16: | 230 | case 16: |
| 232 | *(u16 *) logical_addr_ptr = (u16) * value; | 231 | ACPI_SET16(logical_addr_ptr) = (u16) * value; |
| 233 | break; | 232 | break; |
| 234 | 233 | ||
| 235 | case 32: | 234 | case 32: |
| 236 | *(u32 *) logical_addr_ptr = (u32) * value; | 235 | ACPI_SET32(logical_addr_ptr) = (u32) * value; |
| 237 | break; | 236 | break; |
| 238 | 237 | ||
| 239 | #if ACPI_MACHINE_WIDTH != 16 | 238 | #if ACPI_MACHINE_WIDTH != 16 |
| 240 | case 64: | 239 | case 64: |
| 241 | *(u64 *) logical_addr_ptr = (u64) * value; | 240 | ACPI_SET64(logical_addr_ptr) = (u64) * value; |
| 242 | break; | 241 | break; |
| 243 | #endif | 242 | #endif |
| 244 | 243 | ||
diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c index ff5d8f97e8eb..01b26c80d22b 100644 --- a/drivers/acpi/executer/exresnte.c +++ b/drivers/acpi/executer/exresnte.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 |
| @@ -122,8 +122,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | if (!source_desc) { | 124 | if (!source_desc) { |
| 125 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 125 | ACPI_ERROR((AE_INFO, "No object attached to node %p", node)); |
| 126 | "No object attached to node %p\n", node)); | ||
| 127 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 126 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
| 128 | } | 127 | } |
| 129 | 128 | ||
| @@ -135,10 +134,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 135 | case ACPI_TYPE_PACKAGE: | 134 | case ACPI_TYPE_PACKAGE: |
| 136 | 135 | ||
| 137 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { | 136 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { |
| 138 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 137 | ACPI_ERROR((AE_INFO, "Object not a Package, type %s", |
| 139 | "Object not a Package, type %s\n", | 138 | acpi_ut_get_object_type_name(source_desc))); |
| 140 | acpi_ut_get_object_type_name | ||
| 141 | (source_desc))); | ||
| 142 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 139 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 143 | } | 140 | } |
| 144 | 141 | ||
| @@ -154,10 +151,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 154 | case ACPI_TYPE_BUFFER: | 151 | case ACPI_TYPE_BUFFER: |
| 155 | 152 | ||
| 156 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { | 153 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { |
| 157 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 154 | ACPI_ERROR((AE_INFO, "Object not a Buffer, type %s", |
| 158 | "Object not a Buffer, type %s\n", | 155 | acpi_ut_get_object_type_name(source_desc))); |
| 159 | acpi_ut_get_object_type_name | ||
| 160 | (source_desc))); | ||
| 161 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 156 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 162 | } | 157 | } |
| 163 | 158 | ||
| @@ -173,10 +168,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 173 | case ACPI_TYPE_STRING: | 168 | case ACPI_TYPE_STRING: |
| 174 | 169 | ||
| 175 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { | 170 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { |
| 176 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 171 | ACPI_ERROR((AE_INFO, "Object not a String, type %s", |
| 177 | "Object not a String, type %s\n", | 172 | acpi_ut_get_object_type_name(source_desc))); |
| 178 | acpi_ut_get_object_type_name | ||
| 179 | (source_desc))); | ||
| 180 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 173 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 181 | } | 174 | } |
| 182 | 175 | ||
| @@ -189,10 +182,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 189 | case ACPI_TYPE_INTEGER: | 182 | case ACPI_TYPE_INTEGER: |
| 190 | 183 | ||
| 191 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { | 184 | if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { |
| 192 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 185 | ACPI_ERROR((AE_INFO, "Object not a Integer, type %s", |
| 193 | "Object not a Integer, type %s\n", | 186 | acpi_ut_get_object_type_name(source_desc))); |
| 194 | acpi_ut_get_object_type_name | ||
| 195 | (source_desc))); | ||
| 196 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 187 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 197 | } | 188 | } |
| 198 | 189 | ||
| @@ -236,9 +227,8 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 236 | 227 | ||
| 237 | case ACPI_TYPE_ANY: | 228 | case ACPI_TYPE_ANY: |
| 238 | 229 | ||
| 239 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 230 | ACPI_ERROR((AE_INFO, |
| 240 | "Untyped entry %p, no attached object!\n", | 231 | "Untyped entry %p, no attached object!", node)); |
| 241 | node)); | ||
| 242 | 232 | ||
| 243 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */ | 233 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); /* Cannot be AE_TYPE */ |
| 244 | 234 | ||
| @@ -257,12 +247,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 257 | default: | 247 | default: |
| 258 | /* No named references are allowed here */ | 248 | /* No named references are allowed here */ |
| 259 | 249 | ||
| 260 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 250 | ACPI_ERROR((AE_INFO, |
| 261 | "Unsupported Reference opcode %X (%s)\n", | 251 | "Unsupported Reference opcode %X (%s)", |
| 262 | source_desc->reference.opcode, | 252 | source_desc->reference.opcode, |
| 263 | acpi_ps_get_opcode_name(source_desc-> | 253 | acpi_ps_get_opcode_name(source_desc-> |
| 264 | reference. | 254 | reference.opcode))); |
| 265 | opcode))); | ||
| 266 | 255 | ||
| 267 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 256 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 268 | } | 257 | } |
| @@ -272,9 +261,9 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, | |||
| 272 | 261 | ||
| 273 | /* Default case is for unknown types */ | 262 | /* Default case is for unknown types */ |
| 274 | 263 | ||
| 275 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 264 | ACPI_ERROR((AE_INFO, |
| 276 | "Node %p - Unknown object type %X\n", | 265 | "Node %p - Unknown object type %X", |
| 277 | node, entry_type)); | 266 | node, entry_type)); |
| 278 | 267 | ||
| 279 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 268 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 280 | 269 | ||
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c index 97eecbd3242d..1deed492fe88 100644 --- a/drivers/acpi/executer/exresolv.c +++ b/drivers/acpi/executer/exresolv.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 |
| @@ -81,7 +81,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, | |||
| 81 | ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); | 81 | ACPI_FUNCTION_TRACE_PTR("ex_resolve_to_value", stack_ptr); |
| 82 | 82 | ||
| 83 | if (!stack_ptr || !*stack_ptr) { | 83 | if (!stack_ptr || !*stack_ptr) { |
| 84 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Internal - null pointer\n")); | 84 | ACPI_ERROR((AE_INFO, "Internal - null pointer")); |
| 85 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 85 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| @@ -97,8 +97,7 @@ acpi_ex_resolve_to_value(union acpi_operand_object **stack_ptr, | |||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | if (!*stack_ptr) { | 99 | if (!*stack_ptr) { |
| 100 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 100 | ACPI_ERROR((AE_INFO, "Internal - null pointer")); |
| 101 | "Internal - null pointer\n")); | ||
| 102 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 101 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
| 103 | } | 102 | } |
| 104 | } | 103 | } |
| @@ -228,9 +227,9 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
| 228 | * A NULL object descriptor means an unitialized element of | 227 | * A NULL object descriptor means an unitialized element of |
| 229 | * the package, can't dereference it | 228 | * the package, can't dereference it |
| 230 | */ | 229 | */ |
| 231 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 230 | ACPI_ERROR((AE_INFO, |
| 232 | "Attempt to deref an Index to NULL pkg element Idx=%p\n", | 231 | "Attempt to deref an Index to NULL pkg element Idx=%p", |
| 233 | stack_desc)); | 232 | stack_desc)); |
| 234 | status = AE_AML_UNINITIALIZED_ELEMENT; | 233 | status = AE_AML_UNINITIALIZED_ELEMENT; |
| 235 | } | 234 | } |
| 236 | break; | 235 | break; |
| @@ -239,7 +238,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
| 239 | 238 | ||
| 240 | /* Invalid reference object */ | 239 | /* Invalid reference object */ |
| 241 | 240 | ||
| 242 | ACPI_REPORT_ERROR(("During resolve, Unknown target_type %X in Index/Reference obj %p\n", stack_desc->reference.target_type, stack_desc)); | 241 | ACPI_ERROR((AE_INFO, |
| 242 | "Unknown target_type %X in Index/Reference obj %p", | ||
| 243 | stack_desc->reference.target_type, | ||
| 244 | stack_desc)); | ||
| 243 | status = AE_AML_INTERNAL; | 245 | status = AE_AML_INTERNAL; |
| 244 | break; | 246 | break; |
| 245 | } | 247 | } |
| @@ -264,7 +266,10 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, | |||
| 264 | 266 | ||
| 265 | default: | 267 | default: |
| 266 | 268 | ||
| 267 | ACPI_REPORT_ERROR(("During resolve, Unknown Reference opcode %X (%s) in %p\n", opcode, acpi_ps_get_opcode_name(opcode), stack_desc)); | 269 | ACPI_ERROR((AE_INFO, |
| 270 | "Unknown Reference opcode %X (%s) in %p", | ||
| 271 | opcode, acpi_ps_get_opcode_name(opcode), | ||
| 272 | stack_desc)); | ||
| 268 | status = AE_AML_INTERNAL; | 273 | status = AE_AML_INTERNAL; |
| 269 | break; | 274 | break; |
| 270 | } | 275 | } |
| @@ -386,7 +391,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
| 386 | 391 | ||
| 387 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != | 392 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != |
| 388 | ACPI_DESC_TYPE_NAMED) { | 393 | ACPI_DESC_TYPE_NAMED) { |
| 389 | ACPI_REPORT_ERROR(("acpi_ex_resolve_multiple: Not a NS node %p [%s]\n", node, acpi_ut_get_descriptor_name(node))); | 394 | ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]", |
| 395 | node, | ||
| 396 | acpi_ut_get_descriptor_name(node))); | ||
| 390 | return_ACPI_STATUS(AE_AML_INTERNAL); | 397 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 391 | } | 398 | } |
| 392 | 399 | ||
| @@ -442,7 +449,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
| 442 | 449 | ||
| 443 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != | 450 | if (ACPI_GET_DESCRIPTOR_TYPE(node) != |
| 444 | ACPI_DESC_TYPE_NAMED) { | 451 | ACPI_DESC_TYPE_NAMED) { |
| 445 | ACPI_REPORT_ERROR(("acpi_ex_resolve_multiple: Not a NS node %p [%s]\n", node, acpi_ut_get_descriptor_name(node))); | 452 | ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]", |
| 453 | node, | ||
| 454 | acpi_ut_get_descriptor_name(node))); | ||
| 446 | return_ACPI_STATUS(AE_AML_INTERNAL); | 455 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 447 | } | 456 | } |
| 448 | 457 | ||
| @@ -511,7 +520,9 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, | |||
| 511 | 520 | ||
| 512 | default: | 521 | default: |
| 513 | 522 | ||
| 514 | ACPI_REPORT_ERROR(("acpi_ex_resolve_multiple: Unknown Reference subtype %X\n", obj_desc->reference.opcode)); | 523 | ACPI_ERROR((AE_INFO, |
| 524 | "Unknown Reference subtype %X", | ||
| 525 | obj_desc->reference.opcode)); | ||
| 515 | return_ACPI_STATUS(AE_AML_INTERNAL); | 526 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 516 | } | 527 | } |
| 517 | } | 528 | } |
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c index ff064e79ab90..a1c000f5a415 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 |
| @@ -46,6 +46,7 @@ | |||
| 46 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
| 47 | #include <acpi/acparser.h> | 47 | #include <acpi/acparser.h> |
| 48 | #include <acpi/acinterp.h> | 48 | #include <acpi/acinterp.h> |
| 49 | #include <acpi/acnamesp.h> | ||
| 49 | 50 | ||
| 50 | #define _COMPONENT ACPI_EXECUTER | 51 | #define _COMPONENT ACPI_EXECUTER |
| 51 | ACPI_MODULE_NAME("exresop") | 52 | ACPI_MODULE_NAME("exresop") |
| @@ -73,7 +74,7 @@ static acpi_status | |||
| 73 | acpi_ex_check_object_type(acpi_object_type type_needed, | 74 | acpi_ex_check_object_type(acpi_object_type type_needed, |
| 74 | acpi_object_type this_type, void *object) | 75 | acpi_object_type this_type, void *object) |
| 75 | { | 76 | { |
| 76 | ACPI_FUNCTION_NAME("ex_check_object_type"); | 77 | ACPI_FUNCTION_ENTRY(); |
| 77 | 78 | ||
| 78 | if (type_needed == ACPI_TYPE_ANY) { | 79 | if (type_needed == ACPI_TYPE_ANY) { |
| 79 | /* All types OK, so we don't perform any typechecks */ | 80 | /* All types OK, so we don't perform any typechecks */ |
| @@ -95,10 +96,10 @@ acpi_ex_check_object_type(acpi_object_type type_needed, | |||
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | if (type_needed != this_type) { | 98 | if (type_needed != this_type) { |
| 98 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 99 | ACPI_ERROR((AE_INFO, |
| 99 | "Needed [%s], found [%s] %p\n", | 100 | "Needed type [%s], found [%s] %p", |
| 100 | acpi_ut_get_type_name(type_needed), | 101 | acpi_ut_get_type_name(type_needed), |
| 101 | acpi_ut_get_type_name(this_type), object)); | 102 | acpi_ut_get_type_name(this_type), object)); |
| 102 | 103 | ||
| 103 | return (AE_AML_OPERAND_TYPE); | 104 | return (AE_AML_OPERAND_TYPE); |
| 104 | } | 105 | } |
| @@ -151,13 +152,13 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 151 | 152 | ||
| 152 | arg_types = op_info->runtime_args; | 153 | arg_types = op_info->runtime_args; |
| 153 | if (arg_types == ARGI_INVALID_OPCODE) { | 154 | if (arg_types == ARGI_INVALID_OPCODE) { |
| 154 | ACPI_REPORT_ERROR(("resolve_operands: %X is not a valid AML opcode\n", opcode)); | 155 | ACPI_ERROR((AE_INFO, "Unknown AML opcode %X", opcode)); |
| 155 | 156 | ||
| 156 | return_ACPI_STATUS(AE_AML_INTERNAL); | 157 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 157 | } | 158 | } |
| 158 | 159 | ||
| 159 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | 160 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
| 160 | "Opcode %X [%s] required_operand_types=%8.8X \n", | 161 | "Opcode %X [%s] required_operand_types=%8.8X\n", |
| 161 | opcode, op_info->name, arg_types)); | 162 | opcode, op_info->name, arg_types)); |
| 162 | 163 | ||
| 163 | /* | 164 | /* |
| @@ -169,7 +170,8 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 169 | */ | 170 | */ |
| 170 | while (GET_CURRENT_ARG_TYPE(arg_types)) { | 171 | while (GET_CURRENT_ARG_TYPE(arg_types)) { |
| 171 | if (!stack_ptr || !*stack_ptr) { | 172 | if (!stack_ptr || !*stack_ptr) { |
| 172 | ACPI_REPORT_ERROR(("resolve_operands: Null stack entry at %p\n", stack_ptr)); | 173 | ACPI_ERROR((AE_INFO, "Null stack entry at %p", |
| 174 | stack_ptr)); | ||
| 173 | 175 | ||
| 174 | return_ACPI_STATUS(AE_AML_INTERNAL); | 176 | return_ACPI_STATUS(AE_AML_INTERNAL); |
| 175 | } | 177 | } |
| @@ -187,6 +189,22 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 187 | 189 | ||
| 188 | object_type = | 190 | object_type = |
| 189 | ((struct acpi_namespace_node *)obj_desc)->type; | 191 | ((struct acpi_namespace_node *)obj_desc)->type; |
| 192 | |||
| 193 | /* | ||
| 194 | * Resolve an alias object. The construction of these objects | ||
| 195 | * guarantees that there is only one level of alias indirection; | ||
| 196 | * thus, the attached object is always the aliased namespace node | ||
| 197 | */ | ||
| 198 | if (object_type == ACPI_TYPE_LOCAL_ALIAS) { | ||
| 199 | obj_desc = | ||
| 200 | acpi_ns_get_attached_object((struct | ||
| 201 | acpi_namespace_node | ||
| 202 | *)obj_desc); | ||
| 203 | *stack_ptr = obj_desc; | ||
| 204 | object_type = | ||
| 205 | ((struct acpi_namespace_node *)obj_desc)-> | ||
| 206 | type; | ||
| 207 | } | ||
| 190 | break; | 208 | break; |
| 191 | 209 | ||
| 192 | case ACPI_DESC_TYPE_OPERAND: | 210 | case ACPI_DESC_TYPE_OPERAND: |
| @@ -198,9 +216,9 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 198 | /* Check for bad acpi_object_type */ | 216 | /* Check for bad acpi_object_type */ |
| 199 | 217 | ||
| 200 | if (!acpi_ut_valid_object_type(object_type)) { | 218 | if (!acpi_ut_valid_object_type(object_type)) { |
| 201 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 219 | ACPI_ERROR((AE_INFO, |
| 202 | "Bad operand object type [%X]\n", | 220 | "Bad operand object type [%X]", |
| 203 | object_type)); | 221 | object_type)); |
| 204 | 222 | ||
| 205 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 223 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 206 | } | 224 | } |
| @@ -238,13 +256,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 238 | break; | 256 | break; |
| 239 | 257 | ||
| 240 | default: | 258 | default: |
| 241 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 259 | ACPI_ERROR((AE_INFO, |
| 242 | "Operand is a Reference, Unknown Reference Opcode %X [%s]\n", | 260 | "Operand is a Reference, Unknown Reference Opcode: %X", |
| 243 | obj_desc->reference. | 261 | obj_desc->reference. |
| 244 | opcode, | 262 | opcode)); |
| 245 | (acpi_ps_get_opcode_info | ||
| 246 | (obj_desc->reference. | ||
| 247 | opcode))->name)); | ||
| 248 | 263 | ||
| 249 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 264 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 250 | } | 265 | } |
| @@ -255,11 +270,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 255 | 270 | ||
| 256 | /* Invalid descriptor */ | 271 | /* Invalid descriptor */ |
| 257 | 272 | ||
| 258 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 273 | ACPI_ERROR((AE_INFO, |
| 259 | "Invalid descriptor %p [%s]\n", | 274 | "Invalid descriptor %p [%s]", |
| 260 | obj_desc, | 275 | obj_desc, |
| 261 | acpi_ut_get_descriptor_name | 276 | acpi_ut_get_descriptor_name(obj_desc))); |
| 262 | (obj_desc))); | ||
| 263 | 277 | ||
| 264 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 278 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 265 | } | 279 | } |
| @@ -417,11 +431,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 417 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); | 431 | acpi_ex_convert_to_integer(obj_desc, stack_ptr, 16); |
| 418 | if (ACPI_FAILURE(status)) { | 432 | if (ACPI_FAILURE(status)) { |
| 419 | if (status == AE_TYPE) { | 433 | if (status == AE_TYPE) { |
| 420 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 434 | ACPI_ERROR((AE_INFO, |
| 421 | "Needed [Integer/String/Buffer], found [%s] %p\n", | 435 | "Needed [Integer/String/Buffer], found [%s] %p", |
| 422 | acpi_ut_get_object_type_name | 436 | acpi_ut_get_object_type_name |
| 423 | (obj_desc), | 437 | (obj_desc), obj_desc)); |
| 424 | obj_desc)); | ||
| 425 | 438 | ||
| 426 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 439 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 427 | } | 440 | } |
| @@ -444,11 +457,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 444 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); | 457 | status = acpi_ex_convert_to_buffer(obj_desc, stack_ptr); |
| 445 | if (ACPI_FAILURE(status)) { | 458 | if (ACPI_FAILURE(status)) { |
| 446 | if (status == AE_TYPE) { | 459 | if (status == AE_TYPE) { |
| 447 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 460 | ACPI_ERROR((AE_INFO, |
| 448 | "Needed [Integer/String/Buffer], found [%s] %p\n", | 461 | "Needed [Integer/String/Buffer], found [%s] %p", |
| 449 | acpi_ut_get_object_type_name | 462 | acpi_ut_get_object_type_name |
| 450 | (obj_desc), | 463 | (obj_desc), obj_desc)); |
| 451 | obj_desc)); | ||
| 452 | 464 | ||
| 453 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 465 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 454 | } | 466 | } |
| @@ -472,11 +484,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 472 | ACPI_IMPLICIT_CONVERT_HEX); | 484 | ACPI_IMPLICIT_CONVERT_HEX); |
| 473 | if (ACPI_FAILURE(status)) { | 485 | if (ACPI_FAILURE(status)) { |
| 474 | if (status == AE_TYPE) { | 486 | if (status == AE_TYPE) { |
| 475 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 487 | ACPI_ERROR((AE_INFO, |
| 476 | "Needed [Integer/String/Buffer], found [%s] %p\n", | 488 | "Needed [Integer/String/Buffer], found [%s] %p", |
| 477 | acpi_ut_get_object_type_name | 489 | acpi_ut_get_object_type_name |
| 478 | (obj_desc), | 490 | (obj_desc), obj_desc)); |
| 479 | obj_desc)); | ||
| 480 | 491 | ||
| 481 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 492 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 482 | } | 493 | } |
| @@ -502,10 +513,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 502 | break; | 513 | break; |
| 503 | 514 | ||
| 504 | default: | 515 | default: |
| 505 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 516 | ACPI_ERROR((AE_INFO, |
| 506 | "Needed [Integer/String/Buffer], found [%s] %p\n", | 517 | "Needed [Integer/String/Buffer], found [%s] %p", |
| 507 | acpi_ut_get_object_type_name | 518 | acpi_ut_get_object_type_name |
| 508 | (obj_desc), obj_desc)); | 519 | (obj_desc), obj_desc)); |
| 509 | 520 | ||
| 510 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 521 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 511 | } | 522 | } |
| @@ -539,10 +550,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 539 | break; | 550 | break; |
| 540 | 551 | ||
| 541 | default: | 552 | default: |
| 542 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 553 | ACPI_ERROR((AE_INFO, |
| 543 | "Needed [Integer/String/Buffer], found [%s] %p\n", | 554 | "Needed [Integer/String/Buffer], found [%s] %p", |
| 544 | acpi_ut_get_object_type_name | 555 | acpi_ut_get_object_type_name |
| 545 | (obj_desc), obj_desc)); | 556 | (obj_desc), obj_desc)); |
| 546 | 557 | ||
| 547 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 558 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 548 | } | 559 | } |
| @@ -566,10 +577,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 566 | break; | 577 | break; |
| 567 | 578 | ||
| 568 | default: | 579 | default: |
| 569 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 580 | ACPI_ERROR((AE_INFO, |
| 570 | "Needed [Buffer/String/Package/Reference], found [%s] %p\n", | 581 | "Needed [Buffer/String/Package/Reference], found [%s] %p", |
| 571 | acpi_ut_get_object_type_name | 582 | acpi_ut_get_object_type_name |
| 572 | (obj_desc), obj_desc)); | 583 | (obj_desc), obj_desc)); |
| 573 | 584 | ||
| 574 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 585 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 575 | } | 586 | } |
| @@ -588,10 +599,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 588 | break; | 599 | break; |
| 589 | 600 | ||
| 590 | default: | 601 | default: |
| 591 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 602 | ACPI_ERROR((AE_INFO, |
| 592 | "Needed [Buffer/String/Package], found [%s] %p\n", | 603 | "Needed [Buffer/String/Package], found [%s] %p", |
| 593 | acpi_ut_get_object_type_name | 604 | acpi_ut_get_object_type_name |
| 594 | (obj_desc), obj_desc)); | 605 | (obj_desc), obj_desc)); |
| 595 | 606 | ||
| 596 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 607 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 597 | } | 608 | } |
| @@ -611,10 +622,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 611 | break; | 622 | break; |
| 612 | 623 | ||
| 613 | default: | 624 | default: |
| 614 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 625 | ACPI_ERROR((AE_INFO, |
| 615 | "Needed [Region/region_field], found [%s] %p\n", | 626 | "Needed [Region/region_field], found [%s] %p", |
| 616 | acpi_ut_get_object_type_name | 627 | acpi_ut_get_object_type_name |
| 617 | (obj_desc), obj_desc)); | 628 | (obj_desc), obj_desc)); |
| 618 | 629 | ||
| 619 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 630 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 620 | } | 631 | } |
| @@ -656,10 +667,10 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 656 | break; | 667 | break; |
| 657 | } | 668 | } |
| 658 | 669 | ||
| 659 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 670 | ACPI_ERROR((AE_INFO, |
| 660 | "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p\n", | 671 | "Needed Integer/Buffer/String/Package/Ref/Ddb], found [%s] %p", |
| 661 | acpi_ut_get_object_type_name | 672 | acpi_ut_get_object_type_name |
| 662 | (obj_desc), obj_desc)); | 673 | (obj_desc), obj_desc)); |
| 663 | 674 | ||
| 664 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 675 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 665 | } | 676 | } |
| @@ -669,9 +680,9 @@ acpi_ex_resolve_operands(u16 opcode, | |||
| 669 | 680 | ||
| 670 | /* Unknown type */ | 681 | /* Unknown type */ |
| 671 | 682 | ||
| 672 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 683 | ACPI_ERROR((AE_INFO, |
| 673 | "Internal - Unknown ARGI (required operand) type %X\n", | 684 | "Internal - Unknown ARGI (required operand) type %X", |
| 674 | this_arg_type)); | 685 | this_arg_type)); |
| 675 | 686 | ||
| 676 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 687 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
| 677 | } | 688 | } |
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index a7d8eea305c2..3f020c0e2b95 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.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 |
| @@ -250,7 +250,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
| 250 | /* Validate parameters */ | 250 | /* Validate parameters */ |
| 251 | 251 | ||
| 252 | if (!source_desc || !dest_desc) { | 252 | if (!source_desc || !dest_desc) { |
| 253 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Null parameter\n")); | 253 | ACPI_ERROR((AE_INFO, "Null parameter")); |
| 254 | return_ACPI_STATUS(AE_AML_NO_OPERAND); | 254 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| @@ -290,10 +290,10 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
| 290 | 290 | ||
| 291 | /* Destination is not a Reference object */ | 291 | /* Destination is not a Reference object */ |
| 292 | 292 | ||
| 293 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 293 | ACPI_ERROR((AE_INFO, |
| 294 | "Target is not a Reference or Constant object - %s [%p]\n", | 294 | "Target is not a Reference or Constant object - %s [%p]", |
| 295 | acpi_ut_get_object_type_name(dest_desc), | 295 | acpi_ut_get_object_type_name(dest_desc), |
| 296 | dest_desc)); | 296 | dest_desc)); |
| 297 | 297 | ||
| 298 | ACPI_DUMP_STACK_ENTRY(source_desc); | 298 | ACPI_DUMP_STACK_ENTRY(source_desc); |
| 299 | ACPI_DUMP_STACK_ENTRY(dest_desc); | 299 | ACPI_DUMP_STACK_ENTRY(dest_desc); |
| @@ -360,8 +360,8 @@ acpi_ex_store(union acpi_operand_object *source_desc, | |||
| 360 | 360 | ||
| 361 | default: | 361 | default: |
| 362 | 362 | ||
| 363 | ACPI_REPORT_ERROR(("ex_store: Unknown Reference opcode %X\n", | 363 | ACPI_ERROR((AE_INFO, "Unknown Reference opcode %X", |
| 364 | ref_desc->reference.opcode)); | 364 | ref_desc->reference.opcode)); |
| 365 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); | 365 | ACPI_DUMP_ENTRY(ref_desc, ACPI_LV_ERROR); |
| 366 | 366 | ||
| 367 | status = AE_AML_INTERNAL; | 367 | status = AE_AML_INTERNAL; |
| @@ -490,10 +490,9 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
| 490 | 490 | ||
| 491 | /* All other types are invalid */ | 491 | /* All other types are invalid */ |
| 492 | 492 | ||
| 493 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 493 | ACPI_ERROR((AE_INFO, |
| 494 | "Source must be Integer/Buffer/String type, not %s\n", | 494 | "Source must be Integer/Buffer/String type, not %s", |
| 495 | acpi_ut_get_object_type_name | 495 | acpi_ut_get_object_type_name(source_desc))); |
| 496 | (source_desc))); | ||
| 497 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 496 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
| 498 | } | 497 | } |
| 499 | 498 | ||
| @@ -503,8 +502,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, | |||
| 503 | break; | 502 | break; |
| 504 | 503 | ||
| 505 | default: | 504 | default: |
| 506 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 505 | ACPI_ERROR((AE_INFO, |
| 507 | "Target is not a Package or buffer_field\n")); | 506 | "Target is not a Package or buffer_field")); |
| 508 | status = AE_AML_OPERAND_TYPE; | 507 | status = AE_AML_OPERAND_TYPE; |
| 509 | break; | 508 | break; |
| 510 | } | 509 | } |
diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c index 382f63c14ea1..42967baf760d 100644 --- a/drivers/acpi/executer/exstoren.c +++ b/drivers/acpi/executer/exstoren.c | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | *****************************************************************************/ | 7 | *****************************************************************************/ |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
| 10 | * Copyright (C) 2000 - 2005, R. Byron Moore | 10 | * Copyright (C) 2000 - 2006, R. Byron Moore |
| 11 | * All rights reserved. | 11 | * All rights reserved. |
| 12 | * | 12 | * |
| 13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without |
| @@ -123,11 +123,10 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, | |||
| 123 | && (source_desc->reference.opcode == AML_LOAD_OP))) { | 123 | && (source_desc->reference.opcode == AML_LOAD_OP))) { |
| 124 | /* Conversion successful but still not a valid type */ | 124 | /* Conversion successful but still not a valid type */ |
| 125 | 125 | ||
| 126 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 126 | ACPI_ERROR((AE_INFO, |
| 127 | "Cannot assign type %s to %s (must be type Int/Str/Buf)\n", | 127 | "Cannot assign type %s to %s (must be type Int/Str/Buf)", |
| 128 | acpi_ut_get_object_type_name | 128 | acpi_ut_get_object_type_name(source_desc), |
| 129 | (source_desc), | 129 | acpi_ut_get_type_name(target_type))); |
| 130 | acpi_ut_get_type_name(target_type))); | ||
| 131 | status = AE_AML_OPERAND_TYPE; | 130 | status = AE_AML_OPERAND_TYPE; |
| 132 | } | 131 | } |
| 133 | break; | 132 | break; |
| @@ -135,9 +134,11 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, | |||
| 135 | case ACPI_TYPE_LOCAL_ALIAS: | 134 | case ACPI_TYPE_LOCAL_ALIAS: |
| 136 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: | 135 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: |
| 137 | 136 | ||
| 138 | /* Aliases are resolved by acpi_ex_prep_operands */ | 137 | /* |
| 139 | 138 | * All aliases should have been resolved earlier, during the | |
| 140 | ACPI_REPORT_ERROR(("Store into Alias - should never happen\n")); | 139 | * operand resolution phase. |
| 140 | */ | ||
| 141 | ACPI_ERROR((AE_INFO, "Store into an unresolved Alias object")); | ||
| 141 | status = AE_AML_INTERNAL; | 142 | status = AE_AML_INTERNAL; |
| 142 | break; | 143 | break; |
| 143 | 144 | ||
| @@ -280,9 +281,8 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, | |||
| 280 | /* | 281 | /* |
| 281 | * All other types come here. | 282 | * All other types come here. |
| 282 | */ | 283 | */ |
| 283 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, | 284 | ACPI_WARNING((AE_INFO, "Store into type %s not implemented", |
| 284 | "Store into type %s not implemented\n", | 285 | acpi_ut_get_object_type_name(dest_desc))); |
| 285 | acpi_ut_get_object_type_name(dest_desc))); | ||
| 286 | 286 | ||
| 287 | status = AE_NOT_IMPLEMENTED; | 287 | status = AE_NOT_IMPLEMENTED; |
| 288 | break; | 288 | break; |
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index c4ff654a6697..6ab707087750 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.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 |
| @@ -71,7 +71,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, | |||
| 71 | 71 | ||
| 72 | /* We know that source_desc is a buffer by now */ | 72 | /* We know that source_desc is a buffer by now */ |
| 73 | 73 | ||
| 74 | buffer = (u8 *) source_desc->buffer.pointer; | 74 | buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer); |
| 75 | length = source_desc->buffer.length; | 75 | length = source_desc->buffer.length; |
| 76 | 76 | ||
| 77 | /* | 77 | /* |
| @@ -160,7 +160,7 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, | |||
| 160 | 160 | ||
| 161 | /* We know that source_desc is a string by now */ | 161 | /* We know that source_desc is a string by now */ |
| 162 | 162 | ||
| 163 | buffer = (u8 *) source_desc->string.pointer; | 163 | buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer); |
| 164 | length = source_desc->string.length; | 164 | length = source_desc->string.length; |
| 165 | 165 | ||
| 166 | /* | 166 | /* |
diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c index 8a88b841237d..ea9144f42e1f 100644 --- a/drivers/acpi/executer/exsystem.c +++ b/drivers/acpi/executer/exsystem.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 |
| @@ -129,8 +129,8 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) | |||
| 129 | * (ACPI specifies 100 usec as max, but this gives some slack in | 129 | * (ACPI specifies 100 usec as max, but this gives some slack in |
| 130 | * order to support existing BIOSs) | 130 | * order to support existing BIOSs) |
| 131 | */ | 131 | */ |
| 132 | ACPI_REPORT_ERROR(("Stall: Time parameter is too large (%d)\n", | 132 | ACPI_ERROR((AE_INFO, "Time parameter is too large (%d)", |
| 133 | how_long)); | 133 | how_long)); |
| 134 | status = AE_AML_OPERAND_VALUE; | 134 | status = AE_AML_OPERAND_VALUE; |
| 135 | } else { | 135 | } else { |
| 136 | acpi_os_stall(how_long); | 136 | acpi_os_stall(how_long); |
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index 1ee79d8c8f88..f73a61aeb7ec 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.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 |
| @@ -91,7 +91,7 @@ acpi_status acpi_ex_enter_interpreter(void) | |||
| 91 | 91 | ||
| 92 | status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); | 92 | status = acpi_ut_acquire_mutex(ACPI_MTX_EXECUTE); |
| 93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
| 94 | ACPI_REPORT_ERROR(("Could not acquire interpreter mutex\n")); | 94 | ACPI_ERROR((AE_INFO, "Could not acquire interpreter mutex")); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | return_ACPI_STATUS(status); | 97 | return_ACPI_STATUS(status); |
| @@ -127,7 +127,7 @@ void acpi_ex_exit_interpreter(void) | |||
| 127 | 127 | ||
| 128 | status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); | 128 | status = acpi_ut_release_mutex(ACPI_MTX_EXECUTE); |
| 129 | if (ACPI_FAILURE(status)) { | 129 | if (ACPI_FAILURE(status)) { |
| 130 | ACPI_REPORT_ERROR(("Could not release interpreter mutex\n")); | 130 | ACPI_ERROR((AE_INFO, "Could not release interpreter mutex")); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | return_VOID; | 133 | return_VOID; |
| @@ -200,13 +200,12 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags) | |||
| 200 | if (ACPI_SUCCESS(status)) { | 200 | if (ACPI_SUCCESS(status)) { |
| 201 | locked = TRUE; | 201 | locked = TRUE; |
| 202 | } else { | 202 | } else { |
| 203 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 203 | ACPI_EXCEPTION((AE_INFO, status, |
| 204 | "Could not acquire Global Lock, %s\n", | 204 | "Could not acquire Global Lock")); |
| 205 | acpi_format_exception(status))); | ||
| 206 | } | 205 | } |
| 207 | } | 206 | } |
| 208 | 207 | ||
| 209 | return_VALUE(locked); | 208 | return_UINT8(locked); |
| 210 | } | 209 | } |
| 211 | 210 | ||
| 212 | /******************************************************************************* | 211 | /******************************************************************************* |
| @@ -237,7 +236,8 @@ void acpi_ex_release_global_lock(u8 locked_by_me) | |||
| 237 | if (ACPI_FAILURE(status)) { | 236 | if (ACPI_FAILURE(status)) { |
| 238 | /* Report the error, but there isn't much else we can do */ | 237 | /* Report the error, but there isn't much else we can do */ |
| 239 | 238 | ||
| 240 | ACPI_REPORT_ERROR(("Could not release ACPI Global Lock, %s\n", acpi_format_exception(status))); | 239 | ACPI_EXCEPTION((AE_INFO, status, |
| 240 | "Could not release ACPI Global Lock")); | ||
| 241 | } | 241 | } |
| 242 | } | 242 | } |
| 243 | 243 | ||
| @@ -268,7 +268,7 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) | |||
| 268 | /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ | 268 | /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ |
| 269 | 269 | ||
| 270 | if (value == 0) { | 270 | if (value == 0) { |
| 271 | return_VALUE(1); | 271 | return_UINT32(1); |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | current_value = value; | 274 | current_value = value; |
| @@ -282,7 +282,7 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) | |||
| 282 | num_digits++; | 282 | num_digits++; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | return_VALUE(num_digits); | 285 | return_UINT32(num_digits); |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | /******************************************************************************* | 288 | /******************************************************************************* |
