aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/aclocal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/aclocal.h')
-rw-r--r--include/acpi/aclocal.h57
1 files changed, 27 insertions, 30 deletions
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index 58f9ba1a34e7..4d2635698e10 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -56,6 +56,13 @@ typedef u32 acpi_mutex_handle;
56#define AML_NUM_OPCODES 0x7F 56#define AML_NUM_OPCODES 0x7F
57 57
58 58
59/* Forward declarations */
60
61struct acpi_walk_state ;
62struct acpi_obj_mutex;
63union acpi_parse_object ;
64
65
59/***************************************************************************** 66/*****************************************************************************
60 * 67 *
61 * Mutex typedefs and structs 68 * Mutex typedefs and structs
@@ -116,19 +123,24 @@ static char *acpi_gbl_mutex_names[] =
116#endif 123#endif
117 124
118 125
126/* Owner IDs are used to track namespace nodes for selective deletion */
127
128typedef u8 acpi_owner_id;
129#define ACPI_OWNER_ID_MAX 0xFF
130
131/* This Thread ID means that the mutex is not in use (unlocked) */
132
133#define ACPI_MUTEX_NOT_ACQUIRED (u32) -1
134
119/* Table for the global mutexes */ 135/* Table for the global mutexes */
120 136
121struct acpi_mutex_info 137struct acpi_mutex_info
122{ 138{
123 acpi_mutex mutex; 139 acpi_mutex mutex;
124 u32 use_count; 140 u32 use_count;
125 u32 owner_id; 141 u32 thread_id;
126}; 142};
127 143
128/* This owner ID means that the mutex is not in use (unlocked) */
129
130#define ACPI_MUTEX_NOT_ACQUIRED (u32) (-1)
131
132 144
133/* Lock flag parameter for various interfaces */ 145/* Lock flag parameter for various interfaces */
134 146
@@ -136,13 +148,6 @@ struct acpi_mutex_info
136#define ACPI_MTX_LOCK 1 148#define ACPI_MTX_LOCK 1
137 149
138 150
139typedef u16 acpi_owner_id;
140#define ACPI_OWNER_TYPE_TABLE 0x0
141#define ACPI_OWNER_TYPE_METHOD 0x1
142#define ACPI_FIRST_METHOD_ID 0x0001
143#define ACPI_FIRST_TABLE_ID 0xF000
144
145
146/* Field access granularities */ 151/* Field access granularities */
147 152
148#define ACPI_FIELD_BYTE_GRANULARITY 1 153#define ACPI_FIELD_BYTE_GRANULARITY 1
@@ -185,13 +190,20 @@ struct acpi_namespace_node
185{ 190{
186 u8 descriptor; /* Used to differentiate object descriptor types */ 191 u8 descriptor; /* Used to differentiate object descriptor types */
187 u8 type; /* Type associated with this name */ 192 u8 type; /* Type associated with this name */
188 u16 owner_id; 193 u16 reference_count; /* Current count of references and children */
189 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */ 194 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
190 union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */ 195 union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */
191 struct acpi_namespace_node *child; /* First child */ 196 struct acpi_namespace_node *child; /* First child */
192 struct acpi_namespace_node *peer; /* Next peer*/ 197 struct acpi_namespace_node *peer; /* Next peer*/
193 u16 reference_count; /* Current count of references and children */ 198 u8 owner_id; /* Who created this node */
194 u8 flags; 199 u8 flags;
200
201 /* Fields used by the ASL compiler only */
202
203#ifdef ACPI_ASL_COMPILER
204 u32 value;
205 union acpi_parse_object *op;
206#endif
195}; 207};
196 208
197 209
@@ -222,7 +234,7 @@ struct acpi_table_desc
222 u64 physical_address; 234 u64 physical_address;
223 u32 aml_length; 235 u32 aml_length;
224 acpi_size length; 236 acpi_size length;
225 acpi_owner_id table_id; 237 acpi_owner_id owner_id;
226 u8 type; 238 u8 type;
227 u8 allocation; 239 u8 allocation;
228 u8 loaded_into_namespace; 240 u8 loaded_into_namespace;
@@ -420,13 +432,6 @@ struct acpi_field_info
420#define ACPI_CONTROL_PREDICATE_TRUE 0xC4 432#define ACPI_CONTROL_PREDICATE_TRUE 0xC4
421 433
422 434
423/* Forward declarations */
424
425struct acpi_walk_state ;
426struct acpi_obj_mutex;
427union acpi_parse_object ;
428
429
430#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ 435#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
431 u8 data_type; /* To differentiate various internal objs */\ 436 u8 data_type; /* To differentiate various internal objs */\
432 u8 flags; \ 437 u8 flags; \
@@ -916,14 +921,6 @@ struct acpi_integrity_info
916 * 921 *
917 ****************************************************************************/ 922 ****************************************************************************/
918 923
919struct acpi_debug_print_info
920{
921 u32 component_id;
922 char *proc_name;
923 char *module_name;
924};
925
926
927/* Entry for a memory allocation (debug only) */ 924/* Entry for a memory allocation (debug only) */
928 925
929#define ACPI_MEM_MALLOC 0 926#define ACPI_MEM_MALLOC 0