summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities
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/utilities
parent3d5271f9883cba7b54762bc4fe027d4172f06db7 (diff)
downloadlinux-50eca3eb89d73d9f0aa070b126c7ee6a616016ab.tar.gz
linux-50eca3eb89d73d9f0aa070b126c7ee6a616016ab.tar.bz2
linux-50eca3eb89d73d9f0aa070b126c7ee6a616016ab.zip
[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/utilities')
-rw-r--r--drivers/acpi/utilities/utalloc.c6
-rw-r--r--drivers/acpi/utilities/utglobal.c3
-rw-r--r--drivers/acpi/utilities/utmisc.c6
3 files changed, 9 insertions, 6 deletions
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
index 068450b36475..dc7f24b3a1c0 100644
--- a/drivers/acpi/utilities/utalloc.c
+++ b/drivers/acpi/utilities/utalloc.c
@@ -304,7 +304,7 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line)
if (!size) {
_ACPI_REPORT_ERROR(module, line, component,
- ("ut_allocate: Attempt to allocate zero bytes\n"));
+ ("ut_allocate: Attempt to allocate zero bytes, allocating 1 byte\n"));
size = 1;
}
@@ -347,8 +347,8 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line)
if (!size) {
_ACPI_REPORT_ERROR(module, line, component,
- ("ut_callocate: Attempt to allocate zero bytes\n"));
- return_PTR(NULL);
+ ("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n"));
+ size = 1;
}
allocation = acpi_os_allocate(size);
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 399e64b51886..7f72839841ca 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -825,6 +825,9 @@ void acpi_ut_init_globals(void)
acpi_gbl_ps_find_count = 0;
acpi_gbl_acpi_hardware_present = TRUE;
acpi_gbl_owner_id_mask = 0;
+ acpi_gbl_trace_method_name = 0;
+ acpi_gbl_trace_dbg_level = 0;
+ acpi_gbl_trace_dbg_layer = 0;
acpi_gbl_debugger_configuration = DEBUGGER_THREADING;
acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT;
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index aa1dcd851f89..b57afa7421e8 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -811,15 +811,15 @@ u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object * obj_desc)
while (buffer < end_buffer) {
buffer_byte = *buffer;
- if (buffer_byte & ACPI_RDESC_TYPE_LARGE) {
+ if (buffer_byte & ACPI_RESOURCE_NAME_LARGE) {
/* Large Descriptor - Length is next 2 bytes */
buffer += ((*(buffer + 1) | (*(buffer + 2) << 8)) + 3);
} else {
/* Small Descriptor. End Tag will be found here */
- if ((buffer_byte & ACPI_RDESC_SMALL_MASK) ==
- ACPI_RDESC_TYPE_END_TAG) {
+ if ((buffer_byte & ACPI_RESOURCE_NAME_SMALL_MASK) ==
+ ACPI_RESOURCE_NAME_END_TAG) {
/* Found the end tag descriptor, all done. */
return (buffer);