aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2005-09-30 19:03:00 -0400
committerLen Brown <len.brown@intel.com>2005-12-10 00:20:25 -0500
commit50eca3eb89d73d9f0aa070b126c7ee6a616016ab (patch)
treeb2d06d21b34b9bd17eea4c53cff1f3866fa1b21d /drivers/acpi/executer
parent3d5271f9883cba7b54762bc4fe027d4172f06db7 (diff)
[ACPI] ACPICA 20050930
Completed a major overhaul of the Resource Manager code - specifically, optimizations in the area of the AML/internal resource conversion code. The code has been optimized to simplify and eliminate duplicated code, CPU stack use has been decreased by optimizing function parameters and local variables, and naming conventions across the manager have been standardized for clarity and ease of maintenance (this includes function, parameter, variable, and struct/typedef names.) All Resource Manager dispatch and information tables have been moved to a single location for clarity and ease of maintenance. One new file was created, named "rsinfo.c". The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to guarantee that the argument is not evaluated twice, making them less prone to macro side-effects. However, since there exists the possibility of additional stack use if a particular compiler cannot optimize them (such as in the debug generation case), the original macros are optionally available. Note that some invocations of the return_VALUE macro may now cause size mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to eliminate these. (From Randy Dunlap) Implemented a new mechanism to enable debug tracing for individual control methods. A new external interface, acpi_debug_trace(), is provided to enable this mechanism. The intent is to allow the host OS to easily enable and disable tracing for problematic control methods. This interface can be easily exposed to a user or debugger interface if desired. See the file psxface.c for details. acpi_ut_callocate() will now return a valid pointer if a length of zero is specified - a length of one is used and a warning is issued. This matches the behavior of acpi_ut_allocate(). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r--drivers/acpi/executer/exdump.c10
-rw-r--r--drivers/acpi/executer/exnames.c4
-rw-r--r--drivers/acpi/executer/exprep.c4
-rw-r--r--drivers/acpi/executer/exresop.c2
-rw-r--r--drivers/acpi/executer/exutils.c6
5 files changed, 13 insertions, 13 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index bc2fa996047e..4477a62fed56 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -214,7 +214,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
214 214
215 case ACPI_TYPE_BUFFER: 215 case ACPI_TYPE_BUFFER:
216 216
217 acpi_os_printf("Buffer len %X @ %p \n", 217 acpi_os_printf("Buffer len %X @ %p\n",
218 obj_desc->buffer.length, 218 obj_desc->buffer.length,
219 obj_desc->buffer.pointer); 219 obj_desc->buffer.pointer);
220 220
@@ -320,17 +320,17 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
320 320
321 case ACPI_TYPE_BUFFER_FIELD: 321 case ACPI_TYPE_BUFFER_FIELD:
322 322
323 acpi_os_printf("buffer_field: %X bits at byte %X bit %X of \n", 323 acpi_os_printf("buffer_field: %X bits at byte %X bit %X of\n",
324 obj_desc->buffer_field.bit_length, 324 obj_desc->buffer_field.bit_length,
325 obj_desc->buffer_field.base_byte_offset, 325 obj_desc->buffer_field.base_byte_offset,
326 obj_desc->buffer_field.start_field_bit_offset); 326 obj_desc->buffer_field.start_field_bit_offset);
327 327
328 if (!obj_desc->buffer_field.buffer_obj) { 328 if (!obj_desc->buffer_field.buffer_obj) {
329 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL* \n")); 329 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n"));
330 } else 330 } else
331 if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) 331 if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj)
332 != ACPI_TYPE_BUFFER) { 332 != ACPI_TYPE_BUFFER) {
333 acpi_os_printf("*not a Buffer* \n"); 333 acpi_os_printf("*not a Buffer*\n");
334 } else { 334 } else {
335 acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, 335 acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj,
336 depth + 1); 336 depth + 1);
@@ -618,7 +618,7 @@ acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index)
618 618
619 case ACPI_TYPE_PACKAGE: 619 case ACPI_TYPE_PACKAGE:
620 620
621 acpi_os_printf("[Package] Contains %d Elements: \n", 621 acpi_os_printf("[Package] Contains %d Elements:\n",
622 obj_desc->package.count); 622 obj_desc->package.count);
623 623
624 for (i = 0; i < obj_desc->package.count; i++) { 624 for (i = 0; i < obj_desc->package.count; i++) {
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c
index 239d8473e9a5..dff41121a304 100644
--- a/drivers/acpi/executer/exnames.c
+++ b/drivers/acpi/executer/exnames.c
@@ -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 /*
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
index 7476c363e407..88ccbf3b29d0 100644
--- a/drivers/acpi/executer/exprep.c
+++ b/drivers/acpi/executer/exprep.c
@@ -276,7 +276,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
276 276
277 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 277 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
278 "Unknown field access type %X\n", access)); 278 "Unknown field access type %X\n", access));
279 return_VALUE(0); 279 return_UINT32(0);
280 } 280 }
281 281
282 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { 282 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) {
@@ -289,7 +289,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc,
289 } 289 }
290 290
291 *return_byte_alignment = byte_alignment; 291 *return_byte_alignment = byte_alignment;
292 return_VALUE(bit_length); 292 return_UINT32(bit_length);
293} 293}
294 294
295/******************************************************************************* 295/*******************************************************************************
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c
index ff064e79ab90..b04e4a3707a1 100644
--- a/drivers/acpi/executer/exresop.c
+++ b/drivers/acpi/executer/exresop.c
@@ -157,7 +157,7 @@ acpi_ex_resolve_operands(u16 opcode,
157 } 157 }
158 158
159 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 159 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
160 "Opcode %X [%s] required_operand_types=%8.8X \n", 160 "Opcode %X [%s] required_operand_types=%8.8X\n",
161 opcode, op_info->name, arg_types)); 161 opcode, op_info->name, arg_types));
162 162
163 /* 163 /*
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
index 1ee79d8c8f88..9f4e547d7734 100644
--- a/drivers/acpi/executer/exutils.c
+++ b/drivers/acpi/executer/exutils.c
@@ -206,7 +206,7 @@ u8 acpi_ex_acquire_global_lock(u32 field_flags)
206 } 206 }
207 } 207 }
208 208
209 return_VALUE(locked); 209 return_UINT8(locked);
210} 210}
211 211
212/******************************************************************************* 212/*******************************************************************************
@@ -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/*******************************************************************************