aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acutils.h
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-03-17 16:44:00 -0500
committerLen Brown <len.brown@intel.com>2006-06-14 01:22:20 -0400
commit61686124f47d7c4b78610346c5f8f9d8a6d46bb5 (patch)
tree6fd91b2c1749907e58ef136107e53d634d7978c4 /include/acpi/acutils.h
parent144c87b4e03759214c362d267e01c2905f1ab095 (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.h49
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
80typedef 80typedef
81acpi_status(*acpi_walk_aml_callback) (u8 * aml,
82 u32 length,
83 u32 offset,
84 u8 resource_index, void *context);
85
86typedef
81acpi_status(*acpi_pkg_callback) (u8 object_type, 87acpi_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
478u32 acpi_ut_dword_byte_swap(u32 value);
479
480void acpi_ut_set_integer_width(u8 revision);
481
482#ifdef ACPI_DEBUG_OUTPUT
483void
484acpi_ut_display_init_pathname(u8 type,
485 struct acpi_namespace_node *obj_handle,
486 char *path);
487#endif
488
489/*
490 * utresrc
491 */
492acpi_status
493acpi_ut_walk_aml_resources(u8 * aml,
494 acpi_size aml_length,
495 acpi_walk_aml_callback user_function, void *context);
496
472acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); 497acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index);
473 498
474u32 acpi_ut_get_descriptor_length(void *aml); 499u32 acpi_ut_get_descriptor_length(void *aml);
@@ -483,18 +508,6 @@ acpi_status
483acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, 508acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc,
484 u8 ** end_tag); 509 u8 ** end_tag);
485 510
486u32 acpi_ut_dword_byte_swap(u32 value);
487
488void acpi_ut_set_integer_width(u8 revision);
489
490#ifdef ACPI_DEBUG_OUTPUT
491void
492acpi_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
522void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); 535void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line);
523 536
524void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line); 537void *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
527void *acpi_ut_allocate_and_track(acpi_size size, 541void *acpi_ut_allocate_and_track(acpi_size size,
528 u32 component, char *module, u32 line); 542 u32 component, char *module, u32 line);
529 543
530void *acpi_ut_callocate_and_track(acpi_size size, 544void *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
533void 547void
534acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); 548acpi_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
540void acpi_ut_dump_allocations(u32 component, char *module); 554void acpi_ut_dump_allocations(u32 component, char *module);
555
556acpi_status
557acpi_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 */