aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acstruct.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/acstruct.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/acstruct.h')
-rw-r--r--include/acpi/acstruct.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h
index d8c1c2cdac0c..04e8966a377d 100644
--- a/include/acpi/acstruct.h
+++ b/include/acpi/acstruct.h
@@ -44,6 +44,8 @@
44#ifndef __ACSTRUCT_H__ 44#ifndef __ACSTRUCT_H__
45#define __ACSTRUCT_H__ 45#define __ACSTRUCT_H__
46 46
47/* acpisrc:struct_defs -- for acpisrc conversion */
48
47/***************************************************************************** 49/*****************************************************************************
48 * 50 *
49 * Tree walking typedefs and structs 51 * Tree walking typedefs and structs
@@ -64,54 +66,55 @@
64#define ACPI_WALK_CONST_OPTIONAL 4 66#define ACPI_WALK_CONST_OPTIONAL 4
65 67
66struct acpi_walk_state { 68struct acpi_walk_state {
67 u8 data_type; /* To differentiate various internal objs MUST BE FIRST! */ 69 struct acpi_walk_state *next; /* Next walk_state in list */
70 u8 descriptor_type; /* To differentiate various internal objs */
68 u8 walk_type; 71 u8 walk_type;
69 acpi_owner_id owner_id; /* Owner of objects created during the walk */ 72 u16 opcode; /* Current AML opcode */
70 u8 last_predicate; /* Result of last predicate */
71 u8 current_result; /* */
72 u8 next_op_info; /* Info about next_op */ 73 u8 next_op_info; /* Info about next_op */
73 u8 num_operands; /* Stack pointer for Operands[] array */ 74 u8 num_operands; /* Stack pointer for Operands[] array */
75 acpi_owner_id owner_id; /* Owner of objects created during the walk */
76 u8 last_predicate; /* Result of last predicate */
77 u8 current_result;
74 u8 return_used; 78 u8 return_used;
75 u16 opcode; /* Current AML opcode */
76 u8 scope_depth; 79 u8 scope_depth;
77 u8 pass_number; /* Parse pass during table load */ 80 u8 pass_number; /* Parse pass during table load */
78 u32 arg_count; /* push for fixed or var args */
79 u32 aml_offset; 81 u32 aml_offset;
80 u32 arg_types; 82 u32 arg_types;
81 u32 method_breakpoint; /* For single stepping */ 83 u32 method_breakpoint; /* For single stepping */
82 u32 user_breakpoint; /* User AML breakpoint */ 84 u32 user_breakpoint; /* User AML breakpoint */
83 u32 parse_flags; 85 u32 parse_flags;
86
87 struct acpi_parse_state parser_state; /* Current state of parser */
84 u32 prev_arg_types; 88 u32 prev_arg_types;
89 u8 arg_count; /* push for fixed or var args */
85 90
86 u8 *aml_last_while;
87 struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */ 91 struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
92 struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
93 union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
94 union acpi_operand_object **params;
95
96 u8 *aml_last_while;
88 union acpi_operand_object **caller_return_desc; 97 union acpi_operand_object **caller_return_desc;
89 union acpi_generic_state *control_state; /* List of control states (nested IFs) */ 98 union acpi_generic_state *control_state; /* List of control states (nested IFs) */
90 struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */ 99 struct acpi_namespace_node *deferred_node; /* Used when executing deferred opcodes */
91 struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */ 100 struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */
92 union acpi_operand_object *implicit_return_obj; 101 union acpi_operand_object *implicit_return_obj;
93 struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
94 struct acpi_namespace_node *method_call_node; /* Called method Node */ 102 struct acpi_namespace_node *method_call_node; /* Called method Node */
95 union acpi_parse_object *method_call_op; /* method_call Op if running a method */ 103 union acpi_parse_object *method_call_op; /* method_call Op if running a method */
96 union acpi_operand_object *method_desc; /* Method descriptor if running a method */ 104 union acpi_operand_object *method_desc; /* Method descriptor if running a method */
97 struct acpi_namespace_node *method_node; /* Method node if running a method. */ 105 struct acpi_namespace_node *method_node; /* Method node if running a method. */
98 union acpi_parse_object *op; /* Current parser op */ 106 union acpi_parse_object *op; /* Current parser op */
99 union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
100 const struct acpi_opcode_info *op_info; /* Info on current opcode */ 107 const struct acpi_opcode_info *op_info; /* Info on current opcode */
101 union acpi_parse_object *origin; /* Start of walk [Obsolete] */ 108 union acpi_parse_object *origin; /* Start of walk [Obsolete] */
102 union acpi_operand_object **params;
103 struct acpi_parse_state parser_state; /* Current state of parser */
104 union acpi_operand_object *result_obj; 109 union acpi_operand_object *result_obj;
105 union acpi_generic_state *results; /* Stack of accumulated results */ 110 union acpi_generic_state *results; /* Stack of accumulated results */
106 union acpi_operand_object *return_desc; /* Return object, if any */ 111 union acpi_operand_object *return_desc; /* Return object, if any */
107 union acpi_generic_state *scope_info; /* Stack of nested scopes */ 112 union acpi_generic_state *scope_info; /* Stack of nested scopes */
108
109 union acpi_parse_object *prev_op; /* Last op that was processed */ 113 union acpi_parse_object *prev_op; /* Last op that was processed */
110 union acpi_parse_object *next_op; /* next op to be processed */ 114 union acpi_parse_object *next_op; /* next op to be processed */
115 struct acpi_thread_state *thread;
111 acpi_parse_downwards descending_callback; 116 acpi_parse_downwards descending_callback;
112 acpi_parse_upwards ascending_callback; 117 acpi_parse_upwards ascending_callback;
113 struct acpi_thread_state *thread;
114 struct acpi_walk_state *next; /* Next walk_state in list */
115}; 118};
116 119
117/* Info used by acpi_ps_init_objects */ 120/* Info used by acpi_ps_init_objects */
@@ -151,11 +154,11 @@ struct acpi_walk_info {
151 154
152/* Display Types */ 155/* Display Types */
153 156
154#define ACPI_DISPLAY_SUMMARY (u8) 0 157#define ACPI_DISPLAY_SUMMARY (u8) 0
155#define ACPI_DISPLAY_OBJECTS (u8) 1 158#define ACPI_DISPLAY_OBJECTS (u8) 1
156#define ACPI_DISPLAY_MASK (u8) 1 159#define ACPI_DISPLAY_MASK (u8) 1
157 160
158#define ACPI_DISPLAY_SHORT (u8) 2 161#define ACPI_DISPLAY_SHORT (u8) 2
159 162
160struct acpi_get_devices_info { 163struct acpi_get_devices_info {
161 acpi_walk_callback user_function; 164 acpi_walk_callback user_function;