diff options
author | Bob Moore <robert.moore@intel.com> | 2006-03-17 16:44:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-14 01:22:20 -0400 |
commit | 61686124f47d7c4b78610346c5f8f9d8a6d46bb5 (patch) | |
tree | 6fd91b2c1749907e58ef136107e53d634d7978c4 /include/acpi/acutils.h | |
parent | 144c87b4e03759214c362d267e01c2905f1ab095 (diff) |
[ACPI] ACPICA 20060317
Implemented the use of a cache object for all internal
namespace nodes. Since there are about 1000 static nodes
in a typical system, this will decrease memory use for
cache implementations that minimize per-allocation overhead
(such as a slab allocator.)
Removed the reference count mechanism for internal
namespace nodes, since it was deemed unnecessary. This
reduces the size of each namespace node by about 5%-10%
on all platforms. Nodes are now 20 bytes for the 32-bit
case, and 32 bytes for the 64-bit case.
Optimized several internal data structures to reduce
object size on 64-bit platforms by packing data within
the 64-bit alignment. This includes the frequently used
ACPI_OPERAND_OBJECT, of which there can be ~1000 static
instances corresponding to the namespace objects.
Added two new strings for the predefined _OSI method:
"Windows 2001.1 SP1" and "Windows 2006".
Split the allocation tracking mechanism out to a separate
file, from utalloc.c to uttrack.c. This mechanism appears
to be only useful for application-level code. Kernels may
wish to not include uttrack.c in distributions.
Removed all remnants of the obsolete ACPI_REPORT_* macros
and the associated code. (These macros have been replaced
by the ACPI_ERROR and ACPI_WARNING macros.)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acutils.h')
-rw-r--r-- | include/acpi/acutils.h | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 71ff78c75441..5e69a80c7850 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -78,6 +78,12 @@ extern const char *acpi_gbl_TYPdecode[4]; | |||
78 | #define ACPI_SMALL_VARIABLE_LENGTH 3 | 78 | #define ACPI_SMALL_VARIABLE_LENGTH 3 |
79 | 79 | ||
80 | typedef | 80 | typedef |
81 | acpi_status(*acpi_walk_aml_callback) (u8 * aml, | ||
82 | u32 length, | ||
83 | u32 offset, | ||
84 | u8 resource_index, void *context); | ||
85 | |||
86 | typedef | ||
81 | acpi_status(*acpi_pkg_callback) (u8 object_type, | 87 | acpi_status(*acpi_pkg_callback) (u8 object_type, |
82 | union acpi_operand_object * source_object, | 88 | union acpi_operand_object * source_object, |
83 | union acpi_generic_state * state, | 89 | union acpi_generic_state * state, |
@@ -469,6 +475,25 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); | |||
469 | 475 | ||
470 | #define ACPI_ANY_BASE 0 | 476 | #define ACPI_ANY_BASE 0 |
471 | 477 | ||
478 | u32 acpi_ut_dword_byte_swap(u32 value); | ||
479 | |||
480 | void acpi_ut_set_integer_width(u8 revision); | ||
481 | |||
482 | #ifdef ACPI_DEBUG_OUTPUT | ||
483 | void | ||
484 | acpi_ut_display_init_pathname(u8 type, | ||
485 | struct acpi_namespace_node *obj_handle, | ||
486 | char *path); | ||
487 | #endif | ||
488 | |||
489 | /* | ||
490 | * utresrc | ||
491 | */ | ||
492 | acpi_status | ||
493 | acpi_ut_walk_aml_resources(u8 * aml, | ||
494 | acpi_size aml_length, | ||
495 | acpi_walk_aml_callback user_function, void *context); | ||
496 | |||
472 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); | 497 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); |
473 | 498 | ||
474 | u32 acpi_ut_get_descriptor_length(void *aml); | 499 | u32 acpi_ut_get_descriptor_length(void *aml); |
@@ -483,18 +508,6 @@ acpi_status | |||
483 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, | 508 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, |
484 | u8 ** end_tag); | 509 | u8 ** end_tag); |
485 | 510 | ||
486 | u32 acpi_ut_dword_byte_swap(u32 value); | ||
487 | |||
488 | void acpi_ut_set_integer_width(u8 revision); | ||
489 | |||
490 | #ifdef ACPI_DEBUG_OUTPUT | ||
491 | void | ||
492 | acpi_ut_display_init_pathname(u8 type, | ||
493 | struct acpi_namespace_node *obj_handle, | ||
494 | char *path); | ||
495 | |||
496 | #endif | ||
497 | |||
498 | /* | 511 | /* |
499 | * utmutex - mutex support | 512 | * utmutex - mutex support |
500 | */ | 513 | */ |
@@ -521,14 +534,15 @@ acpi_ut_initialize_buffer(struct acpi_buffer *buffer, | |||
521 | 534 | ||
522 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); | 535 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); |
523 | 536 | ||
524 | void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line); | 537 | void *acpi_ut_allocate_zeroed(acpi_size size, |
538 | u32 component, char *module, u32 line); | ||
525 | 539 | ||
526 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | 540 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
527 | void *acpi_ut_allocate_and_track(acpi_size size, | 541 | void *acpi_ut_allocate_and_track(acpi_size size, |
528 | u32 component, char *module, u32 line); | 542 | u32 component, char *module, u32 line); |
529 | 543 | ||
530 | void *acpi_ut_callocate_and_track(acpi_size size, | 544 | void *acpi_ut_allocate_zeroed_and_track(acpi_size size, |
531 | u32 component, char *module, u32 line); | 545 | u32 component, char *module, u32 line); |
532 | 546 | ||
533 | void | 547 | void |
534 | acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); | 548 | acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); |
@@ -538,6 +552,11 @@ void acpi_ut_dump_allocation_info(void); | |||
538 | #endif /* ACPI_FUTURE_USAGE */ | 552 | #endif /* ACPI_FUTURE_USAGE */ |
539 | 553 | ||
540 | void acpi_ut_dump_allocations(u32 component, char *module); | 554 | void acpi_ut_dump_allocations(u32 component, char *module); |
555 | |||
556 | acpi_status | ||
557 | acpi_ut_create_list(char *list_name, | ||
558 | u16 object_size, struct acpi_memory_list **return_cache); | ||
559 | |||
541 | #endif | 560 | #endif |
542 | 561 | ||
543 | #endif /* _ACUTILS_H */ | 562 | #endif /* _ACUTILS_H */ |