diff options
Diffstat (limited to 'drivers/acpi/parser')
-rw-r--r-- | drivers/acpi/parser/psargs.c | 376 | ||||
-rw-r--r-- | drivers/acpi/parser/psloop.c | 511 | ||||
-rw-r--r-- | drivers/acpi/parser/psopcode.c | 719 | ||||
-rw-r--r-- | drivers/acpi/parser/psparse.c | 362 | ||||
-rw-r--r-- | drivers/acpi/parser/psscope.c | 130 | ||||
-rw-r--r-- | drivers/acpi/parser/pstree.c | 92 | ||||
-rw-r--r-- | drivers/acpi/parser/psutils.c | 105 | ||||
-rw-r--r-- | drivers/acpi/parser/pswalk.c | 26 | ||||
-rw-r--r-- | drivers/acpi/parser/psxface.c | 142 |
9 files changed, 1347 insertions, 1116 deletions
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index b7ac68cc9e1c..5858188f94a6 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c | |||
@@ -41,25 +41,20 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
48 | #include <acpi/acnamesp.h> | 47 | #include <acpi/acnamesp.h> |
49 | 48 | ||
50 | #define _COMPONENT ACPI_PARSER | 49 | #define _COMPONENT ACPI_PARSER |
51 | ACPI_MODULE_NAME ("psargs") | 50 | ACPI_MODULE_NAME("psargs") |
52 | 51 | ||
53 | /* Local prototypes */ | 52 | /* Local prototypes */ |
54 | |||
55 | static u32 | 53 | static u32 |
56 | acpi_ps_get_next_package_length ( | 54 | acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state); |
57 | struct acpi_parse_state *parser_state); | ||
58 | |||
59 | static union acpi_parse_object * | ||
60 | acpi_ps_get_next_field ( | ||
61 | struct acpi_parse_state *parser_state); | ||
62 | 55 | ||
56 | static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state | ||
57 | *parser_state); | ||
63 | 58 | ||
64 | /******************************************************************************* | 59 | /******************************************************************************* |
65 | * | 60 | * |
@@ -75,49 +70,43 @@ acpi_ps_get_next_field ( | |||
75 | ******************************************************************************/ | 70 | ******************************************************************************/ |
76 | 71 | ||
77 | static u32 | 72 | static u32 |
78 | acpi_ps_get_next_package_length ( | 73 | acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state) |
79 | struct acpi_parse_state *parser_state) | ||
80 | { | 74 | { |
81 | u32 encoded_length; | 75 | u32 encoded_length; |
82 | u32 length = 0; | 76 | u32 length = 0; |
83 | 77 | ||
78 | ACPI_FUNCTION_TRACE("ps_get_next_package_length"); | ||
84 | 79 | ||
85 | ACPI_FUNCTION_TRACE ("ps_get_next_package_length"); | 80 | encoded_length = (u32) ACPI_GET8(parser_state->aml); |
86 | |||
87 | |||
88 | encoded_length = (u32) ACPI_GET8 (parser_state->aml); | ||
89 | parser_state->aml++; | 81 | parser_state->aml++; |
90 | 82 | ||
91 | switch (encoded_length >> 6) /* bits 6-7 contain encoding scheme */ { | 83 | switch (encoded_length >> 6) { /* bits 6-7 contain encoding scheme */ |
92 | case 0: /* 1-byte encoding (bits 0-5) */ | 84 | case 0: /* 1-byte encoding (bits 0-5) */ |
93 | 85 | ||
94 | length = (encoded_length & 0x3F); | 86 | length = (encoded_length & 0x3F); |
95 | break; | 87 | break; |
96 | 88 | ||
89 | case 1: /* 2-byte encoding (next byte + bits 0-3) */ | ||
97 | 90 | ||
98 | case 1: /* 2-byte encoding (next byte + bits 0-3) */ | 91 | length = ((ACPI_GET8(parser_state->aml) << 04) | |
99 | 92 | (encoded_length & 0x0F)); | |
100 | length = ((ACPI_GET8 (parser_state->aml) << 04) | | ||
101 | (encoded_length & 0x0F)); | ||
102 | parser_state->aml++; | 93 | parser_state->aml++; |
103 | break; | 94 | break; |
104 | 95 | ||
96 | case 2: /* 3-byte encoding (next 2 bytes + bits 0-3) */ | ||
105 | 97 | ||
106 | case 2: /* 3-byte encoding (next 2 bytes + bits 0-3) */ | 98 | length = ((ACPI_GET8(parser_state->aml + 1) << 12) | |
107 | 99 | (ACPI_GET8(parser_state->aml) << 04) | | |
108 | length = ((ACPI_GET8 (parser_state->aml + 1) << 12) | | 100 | (encoded_length & 0x0F)); |
109 | (ACPI_GET8 (parser_state->aml) << 04) | | ||
110 | (encoded_length & 0x0F)); | ||
111 | parser_state->aml += 2; | 101 | parser_state->aml += 2; |
112 | break; | 102 | break; |
113 | 103 | ||
104 | case 3: /* 4-byte encoding (next 3 bytes + bits 0-3) */ | ||
114 | 105 | ||
115 | case 3: /* 4-byte encoding (next 3 bytes + bits 0-3) */ | 106 | length = ((ACPI_GET8(parser_state->aml + 2) << 20) | |
116 | 107 | (ACPI_GET8(parser_state->aml + 1) << 12) | | |
117 | length = ((ACPI_GET8 (parser_state->aml + 2) << 20) | | 108 | (ACPI_GET8(parser_state->aml) << 04) | |
118 | (ACPI_GET8 (parser_state->aml + 1) << 12) | | 109 | (encoded_length & 0x0F)); |
119 | (ACPI_GET8 (parser_state->aml) << 04) | | ||
120 | (encoded_length & 0x0F)); | ||
121 | parser_state->aml += 3; | 110 | parser_state->aml += 3; |
122 | break; | 111 | break; |
123 | 112 | ||
@@ -127,10 +116,9 @@ acpi_ps_get_next_package_length ( | |||
127 | break; | 116 | break; |
128 | } | 117 | } |
129 | 118 | ||
130 | return_VALUE (length); | 119 | return_VALUE(length); |
131 | } | 120 | } |
132 | 121 | ||
133 | |||
134 | /******************************************************************************* | 122 | /******************************************************************************* |
135 | * | 123 | * |
136 | * FUNCTION: acpi_ps_get_next_package_end | 124 | * FUNCTION: acpi_ps_get_next_package_end |
@@ -144,25 +132,21 @@ acpi_ps_get_next_package_length ( | |||
144 | * | 132 | * |
145 | ******************************************************************************/ | 133 | ******************************************************************************/ |
146 | 134 | ||
147 | u8 * | 135 | u8 *acpi_ps_get_next_package_end(struct acpi_parse_state *parser_state) |
148 | acpi_ps_get_next_package_end ( | ||
149 | struct acpi_parse_state *parser_state) | ||
150 | { | 136 | { |
151 | u8 *start = parser_state->aml; | 137 | u8 *start = parser_state->aml; |
152 | acpi_native_uint length; | 138 | acpi_native_uint length; |
153 | |||
154 | |||
155 | ACPI_FUNCTION_TRACE ("ps_get_next_package_end"); | ||
156 | 139 | ||
140 | ACPI_FUNCTION_TRACE("ps_get_next_package_end"); | ||
157 | 141 | ||
158 | /* Function below changes parser_state->Aml */ | 142 | /* Function below changes parser_state->Aml */ |
159 | 143 | ||
160 | length = (acpi_native_uint) acpi_ps_get_next_package_length (parser_state); | 144 | length = |
145 | (acpi_native_uint) acpi_ps_get_next_package_length(parser_state); | ||
161 | 146 | ||
162 | return_PTR (start + length); /* end of package */ | 147 | return_PTR(start + length); /* end of package */ |
163 | } | 148 | } |
164 | 149 | ||
165 | |||
166 | /******************************************************************************* | 150 | /******************************************************************************* |
167 | * | 151 | * |
168 | * FUNCTION: acpi_ps_get_next_namestring | 152 | * FUNCTION: acpi_ps_get_next_namestring |
@@ -178,20 +162,16 @@ acpi_ps_get_next_package_end ( | |||
178 | * | 162 | * |
179 | ******************************************************************************/ | 163 | ******************************************************************************/ |
180 | 164 | ||
181 | char * | 165 | char *acpi_ps_get_next_namestring(struct acpi_parse_state *parser_state) |
182 | acpi_ps_get_next_namestring ( | ||
183 | struct acpi_parse_state *parser_state) | ||
184 | { | 166 | { |
185 | u8 *start = parser_state->aml; | 167 | u8 *start = parser_state->aml; |
186 | u8 *end = parser_state->aml; | 168 | u8 *end = parser_state->aml; |
187 | |||
188 | |||
189 | ACPI_FUNCTION_TRACE ("ps_get_next_namestring"); | ||
190 | 169 | ||
170 | ACPI_FUNCTION_TRACE("ps_get_next_namestring"); | ||
191 | 171 | ||
192 | /* Handle multiple prefix characters */ | 172 | /* Handle multiple prefix characters */ |
193 | 173 | ||
194 | while (acpi_ps_is_prefix_char (ACPI_GET8 (end))) { | 174 | while (acpi_ps_is_prefix_char(ACPI_GET8(end))) { |
195 | /* Include prefix '\\' or '^' */ | 175 | /* Include prefix '\\' or '^' */ |
196 | 176 | ||
197 | end++; | 177 | end++; |
@@ -199,7 +179,7 @@ acpi_ps_get_next_namestring ( | |||
199 | 179 | ||
200 | /* Decode the path */ | 180 | /* Decode the path */ |
201 | 181 | ||
202 | switch (ACPI_GET8 (end)) { | 182 | switch (ACPI_GET8(end)) { |
203 | case 0: | 183 | case 0: |
204 | 184 | ||
205 | /* null_name */ | 185 | /* null_name */ |
@@ -221,7 +201,7 @@ acpi_ps_get_next_namestring ( | |||
221 | 201 | ||
222 | /* Multiple name segments, 4 chars each */ | 202 | /* Multiple name segments, 4 chars each */ |
223 | 203 | ||
224 | end += 2 + ((acpi_size) ACPI_GET8 (end + 1) * ACPI_NAME_SIZE); | 204 | end += 2 + ((acpi_size) ACPI_GET8(end + 1) * ACPI_NAME_SIZE); |
225 | break; | 205 | break; |
226 | 206 | ||
227 | default: | 207 | default: |
@@ -232,11 +212,10 @@ acpi_ps_get_next_namestring ( | |||
232 | break; | 212 | break; |
233 | } | 213 | } |
234 | 214 | ||
235 | parser_state->aml = (u8*) end; | 215 | parser_state->aml = (u8 *) end; |
236 | return_PTR ((char *) start); | 216 | return_PTR((char *)start); |
237 | } | 217 | } |
238 | 218 | ||
239 | |||
240 | /******************************************************************************* | 219 | /******************************************************************************* |
241 | * | 220 | * |
242 | * FUNCTION: acpi_ps_get_next_namepath | 221 | * FUNCTION: acpi_ps_get_next_namepath |
@@ -259,24 +238,20 @@ acpi_ps_get_next_namestring ( | |||
259 | ******************************************************************************/ | 238 | ******************************************************************************/ |
260 | 239 | ||
261 | acpi_status | 240 | acpi_status |
262 | acpi_ps_get_next_namepath ( | 241 | acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, |
263 | struct acpi_walk_state *walk_state, | 242 | struct acpi_parse_state *parser_state, |
264 | struct acpi_parse_state *parser_state, | 243 | union acpi_parse_object *arg, u8 method_call) |
265 | union acpi_parse_object *arg, | ||
266 | u8 method_call) | ||
267 | { | 244 | { |
268 | char *path; | 245 | char *path; |
269 | union acpi_parse_object *name_op; | 246 | union acpi_parse_object *name_op; |
270 | acpi_status status = AE_OK; | 247 | acpi_status status = AE_OK; |
271 | union acpi_operand_object *method_desc; | 248 | union acpi_operand_object *method_desc; |
272 | struct acpi_namespace_node *node; | 249 | struct acpi_namespace_node *node; |
273 | union acpi_generic_state scope_info; | 250 | union acpi_generic_state scope_info; |
274 | 251 | ||
252 | ACPI_FUNCTION_TRACE("ps_get_next_namepath"); | ||
275 | 253 | ||
276 | ACPI_FUNCTION_TRACE ("ps_get_next_namepath"); | 254 | path = acpi_ps_get_next_namestring(parser_state); |
277 | |||
278 | |||
279 | path = acpi_ps_get_next_namestring (parser_state); | ||
280 | 255 | ||
281 | /* Null path case is allowed */ | 256 | /* Null path case is allowed */ |
282 | 257 | ||
@@ -296,49 +271,50 @@ acpi_ps_get_next_namepath ( | |||
296 | * parent tree, but don't open a new scope -- we just want to lookup the | 271 | * parent tree, but don't open a new scope -- we just want to lookup the |
297 | * object (MUST BE mode EXECUTE to perform upsearch) | 272 | * object (MUST BE mode EXECUTE to perform upsearch) |
298 | */ | 273 | */ |
299 | status = acpi_ns_lookup (&scope_info, path, ACPI_TYPE_ANY, | 274 | status = acpi_ns_lookup(&scope_info, path, ACPI_TYPE_ANY, |
300 | ACPI_IMODE_EXECUTE, | 275 | ACPI_IMODE_EXECUTE, |
301 | ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, | 276 | ACPI_NS_SEARCH_PARENT | |
302 | NULL, &node); | 277 | ACPI_NS_DONT_OPEN_SCOPE, NULL, &node); |
303 | if (ACPI_SUCCESS (status) && method_call) { | 278 | if (ACPI_SUCCESS(status) && method_call) { |
304 | if (node->type == ACPI_TYPE_METHOD) { | 279 | if (node->type == ACPI_TYPE_METHOD) { |
305 | /* This name is actually a control method invocation */ | 280 | /* This name is actually a control method invocation */ |
306 | 281 | ||
307 | method_desc = acpi_ns_get_attached_object (node); | 282 | method_desc = acpi_ns_get_attached_object(node); |
308 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 283 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
309 | "Control Method - %p Desc %p Path=%p\n", | 284 | "Control Method - %p Desc %p Path=%p\n", |
310 | node, method_desc, path)); | 285 | node, method_desc, path)); |
311 | 286 | ||
312 | name_op = acpi_ps_alloc_op (AML_INT_NAMEPATH_OP); | 287 | name_op = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); |
313 | if (!name_op) { | 288 | if (!name_op) { |
314 | return_ACPI_STATUS (AE_NO_MEMORY); | 289 | return_ACPI_STATUS(AE_NO_MEMORY); |
315 | } | 290 | } |
316 | 291 | ||
317 | /* Change arg into a METHOD CALL and attach name to it */ | 292 | /* Change arg into a METHOD CALL and attach name to it */ |
318 | 293 | ||
319 | acpi_ps_init_op (arg, AML_INT_METHODCALL_OP); | 294 | acpi_ps_init_op(arg, AML_INT_METHODCALL_OP); |
320 | name_op->common.value.name = path; | 295 | name_op->common.value.name = path; |
321 | 296 | ||
322 | /* Point METHODCALL/NAME to the METHOD Node */ | 297 | /* Point METHODCALL/NAME to the METHOD Node */ |
323 | 298 | ||
324 | name_op->common.node = node; | 299 | name_op->common.node = node; |
325 | acpi_ps_append_arg (arg, name_op); | 300 | acpi_ps_append_arg(arg, name_op); |
326 | 301 | ||
327 | if (!method_desc) { | 302 | if (!method_desc) { |
328 | ACPI_REPORT_ERROR (( | 303 | ACPI_REPORT_ERROR(("ps_get_next_namepath: Control Method %p has no attached object\n", node)); |
329 | "ps_get_next_namepath: Control Method %p has no attached object\n", | 304 | return_ACPI_STATUS(AE_AML_INTERNAL); |
330 | node)); | ||
331 | return_ACPI_STATUS (AE_AML_INTERNAL); | ||
332 | } | 305 | } |
333 | 306 | ||
334 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 307 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
335 | "Control Method - %p Args %X\n", | 308 | "Control Method - %p Args %X\n", |
336 | node, method_desc->method.param_count)); | 309 | node, |
310 | method_desc->method. | ||
311 | param_count)); | ||
337 | 312 | ||
338 | /* Get the number of arguments to expect */ | 313 | /* Get the number of arguments to expect */ |
339 | 314 | ||
340 | walk_state->arg_count = method_desc->method.param_count; | 315 | walk_state->arg_count = |
341 | return_ACPI_STATUS (AE_OK); | 316 | method_desc->method.param_count; |
317 | return_ACPI_STATUS(AE_OK); | ||
342 | } | 318 | } |
343 | 319 | ||
344 | /* | 320 | /* |
@@ -348,25 +324,26 @@ acpi_ps_get_next_namepath ( | |||
348 | */ | 324 | */ |
349 | } | 325 | } |
350 | 326 | ||
351 | if (ACPI_FAILURE (status)) { | 327 | if (ACPI_FAILURE(status)) { |
352 | /* | 328 | /* |
353 | * 1) Any error other than NOT_FOUND is always severe | 329 | * 1) Any error other than NOT_FOUND is always severe |
354 | * 2) NOT_FOUND is only important if we are executing a method. | 330 | * 2) NOT_FOUND is only important if we are executing a method. |
355 | * 3) If executing a cond_ref_of opcode, NOT_FOUND is ok. | 331 | * 3) If executing a cond_ref_of opcode, NOT_FOUND is ok. |
356 | */ | 332 | */ |
357 | if ((((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) && | 333 | if ((((walk_state-> |
358 | (status == AE_NOT_FOUND) && | 334 | parse_flags & ACPI_PARSE_MODE_MASK) == |
359 | (walk_state->op->common.aml_opcode != AML_COND_REF_OF_OP)) || | 335 | ACPI_PARSE_EXECUTE) && (status == AE_NOT_FOUND) |
360 | 336 | && (walk_state->op->common.aml_opcode != | |
361 | (status != AE_NOT_FOUND)) { | 337 | AML_COND_REF_OF_OP)) |
362 | ACPI_REPORT_NSERROR (path, status); | 338 | || (status != AE_NOT_FOUND)) { |
363 | 339 | ACPI_REPORT_NSERROR(path, status); | |
364 | acpi_os_printf ("search_node %p start_node %p return_node %p\n", | 340 | |
365 | scope_info.scope.node, parser_state->start_node, node); | 341 | acpi_os_printf |
366 | 342 | ("search_node %p start_node %p return_node %p\n", | |
367 | 343 | scope_info.scope.node, | |
368 | } | 344 | parser_state->start_node, node); |
369 | else { | 345 | |
346 | } else { | ||
370 | /* | 347 | /* |
371 | * We got a NOT_FOUND during table load or we encountered | 348 | * We got a NOT_FOUND during table load or we encountered |
372 | * a cond_ref_of(x) where the target does not exist. | 349 | * a cond_ref_of(x) where the target does not exist. |
@@ -381,13 +358,12 @@ acpi_ps_get_next_namepath ( | |||
381 | * Regardless of success/failure above, | 358 | * Regardless of success/failure above, |
382 | * Just initialize the Op with the pathname. | 359 | * Just initialize the Op with the pathname. |
383 | */ | 360 | */ |
384 | acpi_ps_init_op (arg, AML_INT_NAMEPATH_OP); | 361 | acpi_ps_init_op(arg, AML_INT_NAMEPATH_OP); |
385 | arg->common.value.name = path; | 362 | arg->common.value.name = path; |
386 | 363 | ||
387 | return_ACPI_STATUS (status); | 364 | return_ACPI_STATUS(status); |
388 | } | 365 | } |
389 | 366 | ||
390 | |||
391 | /******************************************************************************* | 367 | /******************************************************************************* |
392 | * | 368 | * |
393 | * FUNCTION: acpi_ps_get_next_simple_arg | 369 | * FUNCTION: acpi_ps_get_next_simple_arg |
@@ -403,87 +379,81 @@ acpi_ps_get_next_namepath ( | |||
403 | ******************************************************************************/ | 379 | ******************************************************************************/ |
404 | 380 | ||
405 | void | 381 | void |
406 | acpi_ps_get_next_simple_arg ( | 382 | acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, |
407 | struct acpi_parse_state *parser_state, | 383 | u32 arg_type, union acpi_parse_object *arg) |
408 | u32 arg_type, | ||
409 | union acpi_parse_object *arg) | ||
410 | { | 384 | { |
411 | 385 | ||
412 | ACPI_FUNCTION_TRACE_U32 ("ps_get_next_simple_arg", arg_type); | 386 | ACPI_FUNCTION_TRACE_U32("ps_get_next_simple_arg", arg_type); |
413 | |||
414 | 387 | ||
415 | switch (arg_type) { | 388 | switch (arg_type) { |
416 | case ARGP_BYTEDATA: | 389 | case ARGP_BYTEDATA: |
417 | 390 | ||
418 | acpi_ps_init_op (arg, AML_BYTE_OP); | 391 | acpi_ps_init_op(arg, AML_BYTE_OP); |
419 | arg->common.value.integer = (u32) ACPI_GET8 (parser_state->aml); | 392 | arg->common.value.integer = (u32) ACPI_GET8(parser_state->aml); |
420 | parser_state->aml++; | 393 | parser_state->aml++; |
421 | break; | 394 | break; |
422 | 395 | ||
423 | |||
424 | case ARGP_WORDDATA: | 396 | case ARGP_WORDDATA: |
425 | 397 | ||
426 | acpi_ps_init_op (arg, AML_WORD_OP); | 398 | acpi_ps_init_op(arg, AML_WORD_OP); |
427 | 399 | ||
428 | /* Get 2 bytes from the AML stream */ | 400 | /* Get 2 bytes from the AML stream */ |
429 | 401 | ||
430 | ACPI_MOVE_16_TO_32 (&arg->common.value.integer, parser_state->aml); | 402 | ACPI_MOVE_16_TO_32(&arg->common.value.integer, |
403 | parser_state->aml); | ||
431 | parser_state->aml += 2; | 404 | parser_state->aml += 2; |
432 | break; | 405 | break; |
433 | 406 | ||
434 | |||
435 | case ARGP_DWORDDATA: | 407 | case ARGP_DWORDDATA: |
436 | 408 | ||
437 | acpi_ps_init_op (arg, AML_DWORD_OP); | 409 | acpi_ps_init_op(arg, AML_DWORD_OP); |
438 | 410 | ||
439 | /* Get 4 bytes from the AML stream */ | 411 | /* Get 4 bytes from the AML stream */ |
440 | 412 | ||
441 | ACPI_MOVE_32_TO_32 (&arg->common.value.integer, parser_state->aml); | 413 | ACPI_MOVE_32_TO_32(&arg->common.value.integer, |
414 | parser_state->aml); | ||
442 | parser_state->aml += 4; | 415 | parser_state->aml += 4; |
443 | break; | 416 | break; |
444 | 417 | ||
445 | |||
446 | case ARGP_QWORDDATA: | 418 | case ARGP_QWORDDATA: |
447 | 419 | ||
448 | acpi_ps_init_op (arg, AML_QWORD_OP); | 420 | acpi_ps_init_op(arg, AML_QWORD_OP); |
449 | 421 | ||
450 | /* Get 8 bytes from the AML stream */ | 422 | /* Get 8 bytes from the AML stream */ |
451 | 423 | ||
452 | ACPI_MOVE_64_TO_64 (&arg->common.value.integer, parser_state->aml); | 424 | ACPI_MOVE_64_TO_64(&arg->common.value.integer, |
425 | parser_state->aml); | ||
453 | parser_state->aml += 8; | 426 | parser_state->aml += 8; |
454 | break; | 427 | break; |
455 | 428 | ||
456 | |||
457 | case ARGP_CHARLIST: | 429 | case ARGP_CHARLIST: |
458 | 430 | ||
459 | acpi_ps_init_op (arg, AML_STRING_OP); | 431 | acpi_ps_init_op(arg, AML_STRING_OP); |
460 | arg->common.value.string = (char *) parser_state->aml; | 432 | arg->common.value.string = (char *)parser_state->aml; |
461 | 433 | ||
462 | while (ACPI_GET8 (parser_state->aml) != '\0') { | 434 | while (ACPI_GET8(parser_state->aml) != '\0') { |
463 | parser_state->aml++; | 435 | parser_state->aml++; |
464 | } | 436 | } |
465 | parser_state->aml++; | 437 | parser_state->aml++; |
466 | break; | 438 | break; |
467 | 439 | ||
468 | |||
469 | case ARGP_NAME: | 440 | case ARGP_NAME: |
470 | case ARGP_NAMESTRING: | 441 | case ARGP_NAMESTRING: |
471 | 442 | ||
472 | acpi_ps_init_op (arg, AML_INT_NAMEPATH_OP); | 443 | acpi_ps_init_op(arg, AML_INT_NAMEPATH_OP); |
473 | arg->common.value.name = acpi_ps_get_next_namestring (parser_state); | 444 | arg->common.value.name = |
445 | acpi_ps_get_next_namestring(parser_state); | ||
474 | break; | 446 | break; |
475 | 447 | ||
476 | |||
477 | default: | 448 | default: |
478 | 449 | ||
479 | ACPI_REPORT_ERROR (("Invalid arg_type %X\n", arg_type)); | 450 | ACPI_REPORT_ERROR(("Invalid arg_type %X\n", arg_type)); |
480 | break; | 451 | break; |
481 | } | 452 | } |
482 | 453 | ||
483 | return_VOID; | 454 | return_VOID; |
484 | } | 455 | } |
485 | 456 | ||
486 | |||
487 | /******************************************************************************* | 457 | /******************************************************************************* |
488 | * | 458 | * |
489 | * FUNCTION: acpi_ps_get_next_field | 459 | * FUNCTION: acpi_ps_get_next_field |
@@ -496,24 +466,21 @@ acpi_ps_get_next_simple_arg ( | |||
496 | * | 466 | * |
497 | ******************************************************************************/ | 467 | ******************************************************************************/ |
498 | 468 | ||
499 | static union acpi_parse_object * | 469 | static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state |
500 | acpi_ps_get_next_field ( | 470 | *parser_state) |
501 | struct acpi_parse_state *parser_state) | ||
502 | { | 471 | { |
503 | u32 aml_offset = (u32) | 472 | u32 aml_offset = (u32) |
504 | ACPI_PTR_DIFF (parser_state->aml, | 473 | ACPI_PTR_DIFF(parser_state->aml, |
505 | parser_state->aml_start); | 474 | parser_state->aml_start); |
506 | union acpi_parse_object *field; | 475 | union acpi_parse_object *field; |
507 | u16 opcode; | 476 | u16 opcode; |
508 | u32 name; | 477 | u32 name; |
509 | |||
510 | |||
511 | ACPI_FUNCTION_TRACE ("ps_get_next_field"); | ||
512 | 478 | ||
479 | ACPI_FUNCTION_TRACE("ps_get_next_field"); | ||
513 | 480 | ||
514 | /* Determine field type */ | 481 | /* Determine field type */ |
515 | 482 | ||
516 | switch (ACPI_GET8 (parser_state->aml)) { | 483 | switch (ACPI_GET8(parser_state->aml)) { |
517 | default: | 484 | default: |
518 | 485 | ||
519 | opcode = AML_INT_NAMEDFIELD_OP; | 486 | opcode = AML_INT_NAMEDFIELD_OP; |
@@ -534,9 +501,9 @@ acpi_ps_get_next_field ( | |||
534 | 501 | ||
535 | /* Allocate a new field op */ | 502 | /* Allocate a new field op */ |
536 | 503 | ||
537 | field = acpi_ps_alloc_op (opcode); | 504 | field = acpi_ps_alloc_op(opcode); |
538 | if (!field) { | 505 | if (!field) { |
539 | return_PTR (NULL); | 506 | return_PTR(NULL); |
540 | } | 507 | } |
541 | 508 | ||
542 | field->common.aml_offset = aml_offset; | 509 | field->common.aml_offset = aml_offset; |
@@ -548,33 +515,34 @@ acpi_ps_get_next_field ( | |||
548 | 515 | ||
549 | /* Get the 4-character name */ | 516 | /* Get the 4-character name */ |
550 | 517 | ||
551 | ACPI_MOVE_32_TO_32 (&name, parser_state->aml); | 518 | ACPI_MOVE_32_TO_32(&name, parser_state->aml); |
552 | acpi_ps_set_name (field, name); | 519 | acpi_ps_set_name(field, name); |
553 | parser_state->aml += ACPI_NAME_SIZE; | 520 | parser_state->aml += ACPI_NAME_SIZE; |
554 | 521 | ||
555 | /* Get the length which is encoded as a package length */ | 522 | /* Get the length which is encoded as a package length */ |
556 | 523 | ||
557 | field->common.value.size = acpi_ps_get_next_package_length (parser_state); | 524 | field->common.value.size = |
525 | acpi_ps_get_next_package_length(parser_state); | ||
558 | break; | 526 | break; |
559 | 527 | ||
560 | |||
561 | case AML_INT_RESERVEDFIELD_OP: | 528 | case AML_INT_RESERVEDFIELD_OP: |
562 | 529 | ||
563 | /* Get the length which is encoded as a package length */ | 530 | /* Get the length which is encoded as a package length */ |
564 | 531 | ||
565 | field->common.value.size = acpi_ps_get_next_package_length (parser_state); | 532 | field->common.value.size = |
533 | acpi_ps_get_next_package_length(parser_state); | ||
566 | break; | 534 | break; |
567 | 535 | ||
568 | |||
569 | case AML_INT_ACCESSFIELD_OP: | 536 | case AML_INT_ACCESSFIELD_OP: |
570 | 537 | ||
571 | /* | 538 | /* |
572 | * Get access_type and access_attrib and merge into the field Op | 539 | * Get access_type and access_attrib and merge into the field Op |
573 | * access_type is first operand, access_attribute is second | 540 | * access_type is first operand, access_attribute is second |
574 | */ | 541 | */ |
575 | field->common.value.integer = (ACPI_GET8 (parser_state->aml) << 8); | 542 | field->common.value.integer = |
543 | (ACPI_GET8(parser_state->aml) << 8); | ||
576 | parser_state->aml++; | 544 | parser_state->aml++; |
577 | field->common.value.integer |= ACPI_GET8 (parser_state->aml); | 545 | field->common.value.integer |= ACPI_GET8(parser_state->aml); |
578 | parser_state->aml++; | 546 | parser_state->aml++; |
579 | break; | 547 | break; |
580 | 548 | ||
@@ -584,10 +552,9 @@ acpi_ps_get_next_field ( | |||
584 | break; | 552 | break; |
585 | } | 553 | } |
586 | 554 | ||
587 | return_PTR (field); | 555 | return_PTR(field); |
588 | } | 556 | } |
589 | 557 | ||
590 | |||
591 | /******************************************************************************* | 558 | /******************************************************************************* |
592 | * | 559 | * |
593 | * FUNCTION: acpi_ps_get_next_arg | 560 | * FUNCTION: acpi_ps_get_next_arg |
@@ -605,21 +572,17 @@ acpi_ps_get_next_field ( | |||
605 | ******************************************************************************/ | 572 | ******************************************************************************/ |
606 | 573 | ||
607 | acpi_status | 574 | acpi_status |
608 | acpi_ps_get_next_arg ( | 575 | acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, |
609 | struct acpi_walk_state *walk_state, | 576 | struct acpi_parse_state *parser_state, |
610 | struct acpi_parse_state *parser_state, | 577 | u32 arg_type, union acpi_parse_object **return_arg) |
611 | u32 arg_type, | ||
612 | union acpi_parse_object **return_arg) | ||
613 | { | 578 | { |
614 | union acpi_parse_object *arg = NULL; | 579 | union acpi_parse_object *arg = NULL; |
615 | union acpi_parse_object *prev = NULL; | 580 | union acpi_parse_object *prev = NULL; |
616 | union acpi_parse_object *field; | 581 | union acpi_parse_object *field; |
617 | u32 subop; | 582 | u32 subop; |
618 | acpi_status status = AE_OK; | 583 | acpi_status status = AE_OK; |
619 | |||
620 | |||
621 | ACPI_FUNCTION_TRACE_PTR ("ps_get_next_arg", parser_state); | ||
622 | 584 | ||
585 | ACPI_FUNCTION_TRACE_PTR("ps_get_next_arg", parser_state); | ||
623 | 586 | ||
624 | switch (arg_type) { | 587 | switch (arg_type) { |
625 | case ARGP_BYTEDATA: | 588 | case ARGP_BYTEDATA: |
@@ -631,37 +594,35 @@ acpi_ps_get_next_arg ( | |||
631 | 594 | ||
632 | /* Constants, strings, and namestrings are all the same size */ | 595 | /* Constants, strings, and namestrings are all the same size */ |
633 | 596 | ||
634 | arg = acpi_ps_alloc_op (AML_BYTE_OP); | 597 | arg = acpi_ps_alloc_op(AML_BYTE_OP); |
635 | if (!arg) { | 598 | if (!arg) { |
636 | return_ACPI_STATUS (AE_NO_MEMORY); | 599 | return_ACPI_STATUS(AE_NO_MEMORY); |
637 | } | 600 | } |
638 | acpi_ps_get_next_simple_arg (parser_state, arg_type, arg); | 601 | acpi_ps_get_next_simple_arg(parser_state, arg_type, arg); |
639 | break; | 602 | break; |
640 | 603 | ||
641 | |||
642 | case ARGP_PKGLENGTH: | 604 | case ARGP_PKGLENGTH: |
643 | 605 | ||
644 | /* Package length, nothing returned */ | 606 | /* Package length, nothing returned */ |
645 | 607 | ||
646 | parser_state->pkg_end = acpi_ps_get_next_package_end (parser_state); | 608 | parser_state->pkg_end = |
609 | acpi_ps_get_next_package_end(parser_state); | ||
647 | break; | 610 | break; |
648 | 611 | ||
649 | |||
650 | case ARGP_FIELDLIST: | 612 | case ARGP_FIELDLIST: |
651 | 613 | ||
652 | if (parser_state->aml < parser_state->pkg_end) { | 614 | if (parser_state->aml < parser_state->pkg_end) { |
653 | /* Non-empty list */ | 615 | /* Non-empty list */ |
654 | 616 | ||
655 | while (parser_state->aml < parser_state->pkg_end) { | 617 | while (parser_state->aml < parser_state->pkg_end) { |
656 | field = acpi_ps_get_next_field (parser_state); | 618 | field = acpi_ps_get_next_field(parser_state); |
657 | if (!field) { | 619 | if (!field) { |
658 | return_ACPI_STATUS (AE_NO_MEMORY); | 620 | return_ACPI_STATUS(AE_NO_MEMORY); |
659 | } | 621 | } |
660 | 622 | ||
661 | if (prev) { | 623 | if (prev) { |
662 | prev->common.next = field; | 624 | prev->common.next = field; |
663 | } | 625 | } else { |
664 | else { | ||
665 | arg = field; | 626 | arg = field; |
666 | } | 627 | } |
667 | prev = field; | 628 | prev = field; |
@@ -673,21 +634,21 @@ acpi_ps_get_next_arg ( | |||
673 | } | 634 | } |
674 | break; | 635 | break; |
675 | 636 | ||
676 | |||
677 | case ARGP_BYTELIST: | 637 | case ARGP_BYTELIST: |
678 | 638 | ||
679 | if (parser_state->aml < parser_state->pkg_end) { | 639 | if (parser_state->aml < parser_state->pkg_end) { |
680 | /* Non-empty list */ | 640 | /* Non-empty list */ |
681 | 641 | ||
682 | arg = acpi_ps_alloc_op (AML_INT_BYTELIST_OP); | 642 | arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); |
683 | if (!arg) { | 643 | if (!arg) { |
684 | return_ACPI_STATUS (AE_NO_MEMORY); | 644 | return_ACPI_STATUS(AE_NO_MEMORY); |
685 | } | 645 | } |
686 | 646 | ||
687 | /* Fill in bytelist data */ | 647 | /* Fill in bytelist data */ |
688 | 648 | ||
689 | arg->common.value.size = (u32) | 649 | arg->common.value.size = (u32) |
690 | ACPI_PTR_DIFF (parser_state->pkg_end, parser_state->aml); | 650 | ACPI_PTR_DIFF(parser_state->pkg_end, |
651 | parser_state->aml); | ||
691 | arg->named.data = parser_state->aml; | 652 | arg->named.data = parser_state->aml; |
692 | 653 | ||
693 | /* Skip to End of byte data */ | 654 | /* Skip to End of byte data */ |
@@ -696,32 +657,31 @@ acpi_ps_get_next_arg ( | |||
696 | } | 657 | } |
697 | break; | 658 | break; |
698 | 659 | ||
699 | |||
700 | case ARGP_TARGET: | 660 | case ARGP_TARGET: |
701 | case ARGP_SUPERNAME: | 661 | case ARGP_SUPERNAME: |
702 | case ARGP_SIMPLENAME: | 662 | case ARGP_SIMPLENAME: |
703 | 663 | ||
704 | subop = acpi_ps_peek_opcode (parser_state); | 664 | subop = acpi_ps_peek_opcode(parser_state); |
705 | if (subop == 0 || | 665 | if (subop == 0 || |
706 | acpi_ps_is_leading_char (subop) || | 666 | acpi_ps_is_leading_char(subop) || |
707 | acpi_ps_is_prefix_char (subop)) { | 667 | acpi_ps_is_prefix_char(subop)) { |
708 | /* null_name or name_string */ | 668 | /* null_name or name_string */ |
709 | 669 | ||
710 | arg = acpi_ps_alloc_op (AML_INT_NAMEPATH_OP); | 670 | arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); |
711 | if (!arg) { | 671 | if (!arg) { |
712 | return_ACPI_STATUS (AE_NO_MEMORY); | 672 | return_ACPI_STATUS(AE_NO_MEMORY); |
713 | } | 673 | } |
714 | 674 | ||
715 | status = acpi_ps_get_next_namepath (walk_state, parser_state, arg, 0); | 675 | status = |
716 | } | 676 | acpi_ps_get_next_namepath(walk_state, parser_state, |
717 | else { | 677 | arg, 0); |
678 | } else { | ||
718 | /* Single complex argument, nothing returned */ | 679 | /* Single complex argument, nothing returned */ |
719 | 680 | ||
720 | walk_state->arg_count = 1; | 681 | walk_state->arg_count = 1; |
721 | } | 682 | } |
722 | break; | 683 | break; |
723 | 684 | ||
724 | |||
725 | case ARGP_DATAOBJ: | 685 | case ARGP_DATAOBJ: |
726 | case ARGP_TERMARG: | 686 | case ARGP_TERMARG: |
727 | 687 | ||
@@ -730,7 +690,6 @@ acpi_ps_get_next_arg ( | |||
730 | walk_state->arg_count = 1; | 690 | walk_state->arg_count = 1; |
731 | break; | 691 | break; |
732 | 692 | ||
733 | |||
734 | case ARGP_DATAOBJLIST: | 693 | case ARGP_DATAOBJLIST: |
735 | case ARGP_TERMLIST: | 694 | case ARGP_TERMLIST: |
736 | case ARGP_OBJLIST: | 695 | case ARGP_OBJLIST: |
@@ -742,14 +701,13 @@ acpi_ps_get_next_arg ( | |||
742 | } | 701 | } |
743 | break; | 702 | break; |
744 | 703 | ||
745 | |||
746 | default: | 704 | default: |
747 | 705 | ||
748 | ACPI_REPORT_ERROR (("Invalid arg_type: %X\n", arg_type)); | 706 | ACPI_REPORT_ERROR(("Invalid arg_type: %X\n", arg_type)); |
749 | status = AE_AML_OPERAND_TYPE; | 707 | status = AE_AML_OPERAND_TYPE; |
750 | break; | 708 | break; |
751 | } | 709 | } |
752 | 710 | ||
753 | *return_arg = arg; | 711 | *return_arg = arg; |
754 | return_ACPI_STATUS (status); | 712 | return_ACPI_STATUS(status); |
755 | } | 713 | } |
diff --git a/drivers/acpi/parser/psloop.c b/drivers/acpi/parser/psloop.c index 551d54bdbec3..088d33999d90 100644 --- a/drivers/acpi/parser/psloop.c +++ b/drivers/acpi/parser/psloop.c | |||
@@ -41,7 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | /* | 44 | /* |
46 | * Parse the AML and build an operation tree as most interpreters, | 45 | * Parse the AML and build an operation tree as most interpreters, |
47 | * like Perl, do. Parsing is done by hand rather than with a YACC | 46 | * like Perl, do. Parsing is done by hand rather than with a YACC |
@@ -57,10 +56,9 @@ | |||
57 | #include <acpi/amlcode.h> | 56 | #include <acpi/amlcode.h> |
58 | 57 | ||
59 | #define _COMPONENT ACPI_PARSER | 58 | #define _COMPONENT ACPI_PARSER |
60 | ACPI_MODULE_NAME ("psloop") | 59 | ACPI_MODULE_NAME("psloop") |
61 | |||
62 | static u32 acpi_gbl_depth = 0; | ||
63 | 60 | ||
61 | static u32 acpi_gbl_depth = 0; | ||
64 | 62 | ||
65 | /******************************************************************************* | 63 | /******************************************************************************* |
66 | * | 64 | * |
@@ -75,23 +73,20 @@ static u32 acpi_gbl_depth = 0; | |||
75 | * | 73 | * |
76 | ******************************************************************************/ | 74 | ******************************************************************************/ |
77 | 75 | ||
78 | acpi_status | 76 | acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) |
79 | acpi_ps_parse_loop ( | ||
80 | struct acpi_walk_state *walk_state) | ||
81 | { | 77 | { |
82 | acpi_status status = AE_OK; | 78 | acpi_status status = AE_OK; |
83 | acpi_status status2; | 79 | acpi_status status2; |
84 | union acpi_parse_object *op = NULL; /* current op */ | 80 | union acpi_parse_object *op = NULL; /* current op */ |
85 | union acpi_parse_object *arg = NULL; | 81 | union acpi_parse_object *arg = NULL; |
86 | union acpi_parse_object *pre_op = NULL; | 82 | union acpi_parse_object *pre_op = NULL; |
87 | struct acpi_parse_state *parser_state; | 83 | struct acpi_parse_state *parser_state; |
88 | u8 *aml_op_start = NULL; | 84 | u8 *aml_op_start = NULL; |
89 | |||
90 | 85 | ||
91 | ACPI_FUNCTION_TRACE_PTR ("ps_parse_loop", walk_state); | 86 | ACPI_FUNCTION_TRACE_PTR("ps_parse_loop", walk_state); |
92 | 87 | ||
93 | if (walk_state->descending_callback == NULL) { | 88 | if (walk_state->descending_callback == NULL) { |
94 | return_ACPI_STATUS (AE_BAD_PARAMETER); | 89 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
95 | } | 90 | } |
96 | 91 | ||
97 | parser_state = &walk_state->parser_state; | 92 | parser_state = &walk_state->parser_state; |
@@ -102,45 +97,56 @@ acpi_ps_parse_loop ( | |||
102 | if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) { | 97 | if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) { |
103 | /* We are restarting a preempted control method */ | 98 | /* We are restarting a preempted control method */ |
104 | 99 | ||
105 | if (acpi_ps_has_completed_scope (parser_state)) { | 100 | if (acpi_ps_has_completed_scope(parser_state)) { |
106 | /* | 101 | /* |
107 | * We must check if a predicate to an IF or WHILE statement | 102 | * We must check if a predicate to an IF or WHILE statement |
108 | * was just completed | 103 | * was just completed |
109 | */ | 104 | */ |
110 | if ((parser_state->scope->parse_scope.op) && | 105 | if ((parser_state->scope->parse_scope.op) && |
111 | ((parser_state->scope->parse_scope.op->common.aml_opcode == AML_IF_OP) || | 106 | ((parser_state->scope->parse_scope.op->common. |
112 | (parser_state->scope->parse_scope.op->common.aml_opcode == AML_WHILE_OP)) && | 107 | aml_opcode == AML_IF_OP) |
113 | (walk_state->control_state) && | 108 | || (parser_state->scope->parse_scope.op->common. |
114 | (walk_state->control_state->common.state == | 109 | aml_opcode == AML_WHILE_OP)) |
115 | ACPI_CONTROL_PREDICATE_EXECUTING)) { | 110 | && (walk_state->control_state) |
111 | && (walk_state->control_state->common.state == | ||
112 | ACPI_CONTROL_PREDICATE_EXECUTING)) { | ||
116 | /* | 113 | /* |
117 | * A predicate was just completed, get the value of the | 114 | * A predicate was just completed, get the value of the |
118 | * predicate and branch based on that value | 115 | * predicate and branch based on that value |
119 | */ | 116 | */ |
120 | walk_state->op = NULL; | 117 | walk_state->op = NULL; |
121 | status = acpi_ds_get_predicate_value (walk_state, ACPI_TO_POINTER (TRUE)); | 118 | status = |
122 | if (ACPI_FAILURE (status) && | 119 | acpi_ds_get_predicate_value(walk_state, |
123 | ((status & AE_CODE_MASK) != AE_CODE_CONTROL)) { | 120 | ACPI_TO_POINTER |
121 | (TRUE)); | ||
122 | if (ACPI_FAILURE(status) | ||
123 | && ((status & AE_CODE_MASK) != | ||
124 | AE_CODE_CONTROL)) { | ||
124 | if (status == AE_AML_NO_RETURN_VALUE) { | 125 | if (status == AE_AML_NO_RETURN_VALUE) { |
125 | ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, | 126 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
126 | "Invoked method did not return a value, %s\n", | 127 | "Invoked method did not return a value, %s\n", |
127 | acpi_format_exception (status))); | 128 | acpi_format_exception |
129 | (status))); | ||
128 | 130 | ||
129 | } | 131 | } |
130 | ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, | 132 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
131 | "get_predicate Failed, %s\n", | 133 | "get_predicate Failed, %s\n", |
132 | acpi_format_exception (status))); | 134 | acpi_format_exception |
133 | return_ACPI_STATUS (status); | 135 | (status))); |
136 | return_ACPI_STATUS(status); | ||
134 | } | 137 | } |
135 | 138 | ||
136 | status = acpi_ps_next_parse_state (walk_state, op, status); | 139 | status = |
140 | acpi_ps_next_parse_state(walk_state, op, | ||
141 | status); | ||
137 | } | 142 | } |
138 | 143 | ||
139 | acpi_ps_pop_scope (parser_state, &op, | 144 | acpi_ps_pop_scope(parser_state, &op, |
140 | &walk_state->arg_types, &walk_state->arg_count); | 145 | &walk_state->arg_types, |
141 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", op)); | 146 | &walk_state->arg_count); |
142 | } | 147 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
143 | else if (walk_state->prev_op) { | 148 | "Popped scope, Op=%p\n", op)); |
149 | } else if (walk_state->prev_op) { | ||
144 | /* We were in the middle of an op */ | 150 | /* We were in the middle of an op */ |
145 | 151 | ||
146 | op = walk_state->prev_op; | 152 | op = walk_state->prev_op; |
@@ -156,9 +162,10 @@ acpi_ps_parse_loop ( | |||
156 | if (!op) { | 162 | if (!op) { |
157 | /* Get the next opcode from the AML stream */ | 163 | /* Get the next opcode from the AML stream */ |
158 | 164 | ||
159 | walk_state->aml_offset = (u32) ACPI_PTR_DIFF (parser_state->aml, | 165 | walk_state->aml_offset = |
160 | parser_state->aml_start); | 166 | (u32) ACPI_PTR_DIFF(parser_state->aml, |
161 | walk_state->opcode = acpi_ps_peek_opcode (parser_state); | 167 | parser_state->aml_start); |
168 | walk_state->opcode = acpi_ps_peek_opcode(parser_state); | ||
162 | 169 | ||
163 | /* | 170 | /* |
164 | * First cut to determine what we have found: | 171 | * First cut to determine what we have found: |
@@ -166,7 +173,8 @@ acpi_ps_parse_loop ( | |||
166 | * 2) A name string | 173 | * 2) A name string |
167 | * 3) An unknown/invalid opcode | 174 | * 3) An unknown/invalid opcode |
168 | */ | 175 | */ |
169 | walk_state->op_info = acpi_ps_get_opcode_info (walk_state->opcode); | 176 | walk_state->op_info = |
177 | acpi_ps_get_opcode_info(walk_state->opcode); | ||
170 | switch (walk_state->op_info->class) { | 178 | switch (walk_state->op_info->class) { |
171 | case AML_CLASS_ASCII: | 179 | case AML_CLASS_ASCII: |
172 | case AML_CLASS_PREFIX: | 180 | case AML_CLASS_PREFIX: |
@@ -182,11 +190,13 @@ acpi_ps_parse_loop ( | |||
182 | 190 | ||
183 | /* The opcode is unrecognized. Just skip unknown opcodes */ | 191 | /* The opcode is unrecognized. Just skip unknown opcodes */ |
184 | 192 | ||
185 | ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, | 193 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
186 | "Found unknown opcode %X at AML address %p offset %X, ignoring\n", | 194 | "Found unknown opcode %X at AML address %p offset %X, ignoring\n", |
187 | walk_state->opcode, parser_state->aml, walk_state->aml_offset)); | 195 | walk_state->opcode, |
196 | parser_state->aml, | ||
197 | walk_state->aml_offset)); | ||
188 | 198 | ||
189 | ACPI_DUMP_BUFFER (parser_state->aml, 128); | 199 | ACPI_DUMP_BUFFER(parser_state->aml, 128); |
190 | 200 | ||
191 | /* Assume one-byte bad opcode */ | 201 | /* Assume one-byte bad opcode */ |
192 | 202 | ||
@@ -197,8 +207,10 @@ acpi_ps_parse_loop ( | |||
197 | 207 | ||
198 | /* Found opcode info, this is a normal opcode */ | 208 | /* Found opcode info, this is a normal opcode */ |
199 | 209 | ||
200 | parser_state->aml += acpi_ps_get_opcode_size (walk_state->opcode); | 210 | parser_state->aml += |
201 | walk_state->arg_types = walk_state->op_info->parse_args; | 211 | acpi_ps_get_opcode_size(walk_state->opcode); |
212 | walk_state->arg_types = | ||
213 | walk_state->op_info->parse_args; | ||
202 | break; | 214 | break; |
203 | } | 215 | } |
204 | 216 | ||
@@ -208,7 +220,9 @@ acpi_ps_parse_loop ( | |||
208 | /* Allocate a new pre_op if necessary */ | 220 | /* Allocate a new pre_op if necessary */ |
209 | 221 | ||
210 | if (!pre_op) { | 222 | if (!pre_op) { |
211 | pre_op = acpi_ps_alloc_op (walk_state->opcode); | 223 | pre_op = |
224 | acpi_ps_alloc_op(walk_state-> | ||
225 | opcode); | ||
212 | if (!pre_op) { | 226 | if (!pre_op) { |
213 | status = AE_NO_MEMORY; | 227 | status = AE_NO_MEMORY; |
214 | goto close_this_op; | 228 | goto close_this_op; |
@@ -222,30 +236,40 @@ acpi_ps_parse_loop ( | |||
222 | * Get and append arguments until we find the node that contains | 236 | * Get and append arguments until we find the node that contains |
223 | * the name (the type ARGP_NAME). | 237 | * the name (the type ARGP_NAME). |
224 | */ | 238 | */ |
225 | while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) && | 239 | while (GET_CURRENT_ARG_TYPE |
226 | (GET_CURRENT_ARG_TYPE (walk_state->arg_types) != ARGP_NAME)) { | 240 | (walk_state->arg_types) |
227 | status = acpi_ps_get_next_arg (walk_state, parser_state, | 241 | && |
228 | GET_CURRENT_ARG_TYPE (walk_state->arg_types), &arg); | 242 | (GET_CURRENT_ARG_TYPE |
229 | if (ACPI_FAILURE (status)) { | 243 | (walk_state->arg_types) != ARGP_NAME)) { |
244 | status = | ||
245 | acpi_ps_get_next_arg(walk_state, | ||
246 | parser_state, | ||
247 | GET_CURRENT_ARG_TYPE | ||
248 | (walk_state-> | ||
249 | arg_types), | ||
250 | &arg); | ||
251 | if (ACPI_FAILURE(status)) { | ||
230 | goto close_this_op; | 252 | goto close_this_op; |
231 | } | 253 | } |
232 | 254 | ||
233 | acpi_ps_append_arg (pre_op, arg); | 255 | acpi_ps_append_arg(pre_op, arg); |
234 | INCREMENT_ARG_LIST (walk_state->arg_types); | 256 | INCREMENT_ARG_LIST(walk_state-> |
257 | arg_types); | ||
235 | } | 258 | } |
236 | 259 | ||
237 | /* | 260 | /* |
238 | * Make sure that we found a NAME and didn't run out of | 261 | * Make sure that we found a NAME and didn't run out of |
239 | * arguments | 262 | * arguments |
240 | */ | 263 | */ |
241 | if (!GET_CURRENT_ARG_TYPE (walk_state->arg_types)) { | 264 | if (!GET_CURRENT_ARG_TYPE |
265 | (walk_state->arg_types)) { | ||
242 | status = AE_AML_NO_OPERAND; | 266 | status = AE_AML_NO_OPERAND; |
243 | goto close_this_op; | 267 | goto close_this_op; |
244 | } | 268 | } |
245 | 269 | ||
246 | /* We know that this arg is a name, move to next arg */ | 270 | /* We know that this arg is a name, move to next arg */ |
247 | 271 | ||
248 | INCREMENT_ARG_LIST (walk_state->arg_types); | 272 | INCREMENT_ARG_LIST(walk_state->arg_types); |
249 | 273 | ||
250 | /* | 274 | /* |
251 | * Find the object. This will either insert the object into | 275 | * Find the object. This will either insert the object into |
@@ -253,11 +277,14 @@ acpi_ps_parse_loop ( | |||
253 | */ | 277 | */ |
254 | walk_state->op = NULL; | 278 | walk_state->op = NULL; |
255 | 279 | ||
256 | status = walk_state->descending_callback (walk_state, &op); | 280 | status = |
257 | if (ACPI_FAILURE (status)) { | 281 | walk_state->descending_callback(walk_state, |
258 | ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, | 282 | &op); |
259 | "During name lookup/catalog, %s\n", | 283 | if (ACPI_FAILURE(status)) { |
260 | acpi_format_exception (status))); | 284 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
285 | "During name lookup/catalog, %s\n", | ||
286 | acpi_format_exception | ||
287 | (status))); | ||
261 | goto close_this_op; | 288 | goto close_this_op; |
262 | } | 289 | } |
263 | 290 | ||
@@ -265,17 +292,20 @@ acpi_ps_parse_loop ( | |||
265 | continue; | 292 | continue; |
266 | } | 293 | } |
267 | 294 | ||
268 | status = acpi_ps_next_parse_state (walk_state, op, status); | 295 | status = |
296 | acpi_ps_next_parse_state(walk_state, op, | ||
297 | status); | ||
269 | if (status == AE_CTRL_PENDING) { | 298 | if (status == AE_CTRL_PENDING) { |
270 | status = AE_OK; | 299 | status = AE_OK; |
271 | goto close_this_op; | 300 | goto close_this_op; |
272 | } | 301 | } |
273 | 302 | ||
274 | if (ACPI_FAILURE (status)) { | 303 | if (ACPI_FAILURE(status)) { |
275 | goto close_this_op; | 304 | goto close_this_op; |
276 | } | 305 | } |
277 | 306 | ||
278 | acpi_ps_append_arg (op, pre_op->common.value.arg); | 307 | acpi_ps_append_arg(op, |
308 | pre_op->common.value.arg); | ||
279 | acpi_gbl_depth++; | 309 | acpi_gbl_depth++; |
280 | 310 | ||
281 | if (op->common.aml_opcode == AML_REGION_OP) { | 311 | if (op->common.aml_opcode == AML_REGION_OP) { |
@@ -291,15 +321,15 @@ acpi_ps_parse_loop ( | |||
291 | * | 321 | * |
292 | * (Length is unknown until parse of the body complete) | 322 | * (Length is unknown until parse of the body complete) |
293 | */ | 323 | */ |
294 | op->named.data = aml_op_start; | 324 | op->named.data = aml_op_start; |
295 | op->named.length = 0; | 325 | op->named.length = 0; |
296 | } | 326 | } |
297 | } | 327 | } else { |
298 | else { | ||
299 | /* Not a named opcode, just allocate Op and append to parent */ | 328 | /* Not a named opcode, just allocate Op and append to parent */ |
300 | 329 | ||
301 | walk_state->op_info = acpi_ps_get_opcode_info (walk_state->opcode); | 330 | walk_state->op_info = |
302 | op = acpi_ps_alloc_op (walk_state->opcode); | 331 | acpi_ps_get_opcode_info(walk_state->opcode); |
332 | op = acpi_ps_alloc_op(walk_state->opcode); | ||
303 | if (!op) { | 333 | if (!op) { |
304 | status = AE_NO_MEMORY; | 334 | status = AE_NO_MEMORY; |
305 | goto close_this_op; | 335 | goto close_this_op; |
@@ -310,11 +340,12 @@ acpi_ps_parse_loop ( | |||
310 | * Backup to beginning of create_xXXfield declaration | 340 | * Backup to beginning of create_xXXfield declaration |
311 | * body_length is unknown until we parse the body | 341 | * body_length is unknown until we parse the body |
312 | */ | 342 | */ |
313 | op->named.data = aml_op_start; | 343 | op->named.data = aml_op_start; |
314 | op->named.length = 0; | 344 | op->named.length = 0; |
315 | } | 345 | } |
316 | 346 | ||
317 | acpi_ps_append_arg (acpi_ps_get_parent_scope (parser_state), op); | 347 | acpi_ps_append_arg(acpi_ps_get_parent_scope |
348 | (parser_state), op); | ||
318 | 349 | ||
319 | if ((walk_state->descending_callback != NULL)) { | 350 | if ((walk_state->descending_callback != NULL)) { |
320 | /* | 351 | /* |
@@ -323,14 +354,20 @@ acpi_ps_parse_loop ( | |||
323 | */ | 354 | */ |
324 | walk_state->op = op; | 355 | walk_state->op = op; |
325 | 356 | ||
326 | status = walk_state->descending_callback (walk_state, &op); | 357 | status = |
327 | status = acpi_ps_next_parse_state (walk_state, op, status); | 358 | walk_state-> |
359 | descending_callback(walk_state, | ||
360 | &op); | ||
361 | status = | ||
362 | acpi_ps_next_parse_state(walk_state, | ||
363 | op, | ||
364 | status); | ||
328 | if (status == AE_CTRL_PENDING) { | 365 | if (status == AE_CTRL_PENDING) { |
329 | status = AE_OK; | 366 | status = AE_OK; |
330 | goto close_this_op; | 367 | goto close_this_op; |
331 | } | 368 | } |
332 | 369 | ||
333 | if (ACPI_FAILURE (status)) { | 370 | if (ACPI_FAILURE(status)) { |
334 | goto close_this_op; | 371 | goto close_this_op; |
335 | } | 372 | } |
336 | } | 373 | } |
@@ -339,14 +376,15 @@ acpi_ps_parse_loop ( | |||
339 | op->common.aml_offset = walk_state->aml_offset; | 376 | op->common.aml_offset = walk_state->aml_offset; |
340 | 377 | ||
341 | if (walk_state->op_info) { | 378 | if (walk_state->op_info) { |
342 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 379 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
343 | "Opcode %4.4X [%s] Op %p Aml %p aml_offset %5.5X\n", | 380 | "Opcode %4.4X [%s] Op %p Aml %p aml_offset %5.5X\n", |
344 | (u32) op->common.aml_opcode, walk_state->op_info->name, | 381 | (u32) op->common.aml_opcode, |
345 | op, parser_state->aml, op->common.aml_offset)); | 382 | walk_state->op_info->name, op, |
383 | parser_state->aml, | ||
384 | op->common.aml_offset)); | ||
346 | } | 385 | } |
347 | } | 386 | } |
348 | 387 | ||
349 | |||
350 | /* | 388 | /* |
351 | * Start arg_count at zero because we don't know if there are | 389 | * Start arg_count at zero because we don't know if there are |
352 | * any args yet | 390 | * any args yet |
@@ -359,22 +397,27 @@ acpi_ps_parse_loop ( | |||
359 | /* Get arguments */ | 397 | /* Get arguments */ |
360 | 398 | ||
361 | switch (op->common.aml_opcode) { | 399 | switch (op->common.aml_opcode) { |
362 | case AML_BYTE_OP: /* AML_BYTEDATA_ARG */ | 400 | case AML_BYTE_OP: /* AML_BYTEDATA_ARG */ |
363 | case AML_WORD_OP: /* AML_WORDDATA_ARG */ | 401 | case AML_WORD_OP: /* AML_WORDDATA_ARG */ |
364 | case AML_DWORD_OP: /* AML_DWORDATA_ARG */ | 402 | case AML_DWORD_OP: /* AML_DWORDATA_ARG */ |
365 | case AML_QWORD_OP: /* AML_QWORDATA_ARG */ | 403 | case AML_QWORD_OP: /* AML_QWORDATA_ARG */ |
366 | case AML_STRING_OP: /* AML_ASCIICHARLIST_ARG */ | 404 | case AML_STRING_OP: /* AML_ASCIICHARLIST_ARG */ |
367 | 405 | ||
368 | /* Fill in constant or string argument directly */ | 406 | /* Fill in constant or string argument directly */ |
369 | 407 | ||
370 | acpi_ps_get_next_simple_arg (parser_state, | 408 | acpi_ps_get_next_simple_arg(parser_state, |
371 | GET_CURRENT_ARG_TYPE (walk_state->arg_types), op); | 409 | GET_CURRENT_ARG_TYPE |
410 | (walk_state-> | ||
411 | arg_types), op); | ||
372 | break; | 412 | break; |
373 | 413 | ||
374 | case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */ | 414 | case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */ |
375 | 415 | ||
376 | status = acpi_ps_get_next_namepath (walk_state, parser_state, op, 1); | 416 | status = |
377 | if (ACPI_FAILURE (status)) { | 417 | acpi_ps_get_next_namepath(walk_state, |
418 | parser_state, op, | ||
419 | 1); | ||
420 | if (ACPI_FAILURE(status)) { | ||
378 | goto close_this_op; | 421 | goto close_this_op; |
379 | } | 422 | } |
380 | 423 | ||
@@ -386,34 +429,46 @@ acpi_ps_parse_loop ( | |||
386 | * Op is not a constant or string, append each argument | 429 | * Op is not a constant or string, append each argument |
387 | * to the Op | 430 | * to the Op |
388 | */ | 431 | */ |
389 | while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) && | 432 | while (GET_CURRENT_ARG_TYPE |
390 | !walk_state->arg_count) { | 433 | (walk_state->arg_types) |
434 | && !walk_state->arg_count) { | ||
391 | walk_state->aml_offset = (u32) | 435 | walk_state->aml_offset = (u32) |
392 | ACPI_PTR_DIFF (parser_state->aml, parser_state->aml_start); | 436 | ACPI_PTR_DIFF(parser_state->aml, |
393 | 437 | parser_state-> | |
394 | status = acpi_ps_get_next_arg (walk_state, parser_state, | 438 | aml_start); |
395 | GET_CURRENT_ARG_TYPE (walk_state->arg_types), | 439 | |
396 | &arg); | 440 | status = |
397 | if (ACPI_FAILURE (status)) { | 441 | acpi_ps_get_next_arg(walk_state, |
442 | parser_state, | ||
443 | GET_CURRENT_ARG_TYPE | ||
444 | (walk_state-> | ||
445 | arg_types), | ||
446 | &arg); | ||
447 | if (ACPI_FAILURE(status)) { | ||
398 | goto close_this_op; | 448 | goto close_this_op; |
399 | } | 449 | } |
400 | 450 | ||
401 | if (arg) { | 451 | if (arg) { |
402 | arg->common.aml_offset = walk_state->aml_offset; | 452 | arg->common.aml_offset = |
403 | acpi_ps_append_arg (op, arg); | 453 | walk_state->aml_offset; |
454 | acpi_ps_append_arg(op, arg); | ||
404 | } | 455 | } |
405 | INCREMENT_ARG_LIST (walk_state->arg_types); | 456 | INCREMENT_ARG_LIST(walk_state-> |
457 | arg_types); | ||
406 | } | 458 | } |
407 | 459 | ||
408 | |||
409 | /* Special processing for certain opcodes */ | 460 | /* Special processing for certain opcodes */ |
410 | 461 | ||
411 | /* TBD (remove): Temporary mechanism to disable this code if needed */ | 462 | /* TBD (remove): Temporary mechanism to disable this code if needed */ |
412 | 463 | ||
413 | #ifdef ACPI_ENABLE_MODULE_LEVEL_CODE | 464 | #ifdef ACPI_ENABLE_MODULE_LEVEL_CODE |
414 | 465 | ||
415 | if ((walk_state->pass_number <= ACPI_IMODE_LOAD_PASS1) && | 466 | if ((walk_state->pass_number <= |
416 | ((walk_state->parse_flags & ACPI_PARSE_DISASSEMBLE) == 0)) { | 467 | ACPI_IMODE_LOAD_PASS1) |
468 | && | ||
469 | ((walk_state-> | ||
470 | parse_flags & ACPI_PARSE_DISASSEMBLE) == | ||
471 | 0)) { | ||
417 | /* | 472 | /* |
418 | * We want to skip If/Else/While constructs during Pass1 | 473 | * We want to skip If/Else/While constructs during Pass1 |
419 | * because we want to actually conditionally execute the | 474 | * because we want to actually conditionally execute the |
@@ -427,12 +482,13 @@ acpi_ps_parse_loop ( | |||
427 | case AML_ELSE_OP: | 482 | case AML_ELSE_OP: |
428 | case AML_WHILE_OP: | 483 | case AML_WHILE_OP: |
429 | 484 | ||
430 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 485 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
431 | "Pass1: Skipping an If/Else/While body\n")); | 486 | "Pass1: Skipping an If/Else/While body\n")); |
432 | 487 | ||
433 | /* Skip body of if/else/while in pass 1 */ | 488 | /* Skip body of if/else/while in pass 1 */ |
434 | 489 | ||
435 | parser_state->aml = parser_state->pkg_end; | 490 | parser_state->aml = |
491 | parser_state->pkg_end; | ||
436 | walk_state->arg_count = 0; | 492 | walk_state->arg_count = 0; |
437 | break; | 493 | break; |
438 | 494 | ||
@@ -451,13 +507,15 @@ acpi_ps_parse_loop ( | |||
451 | * | 507 | * |
452 | * Save the length and address of the body | 508 | * Save the length and address of the body |
453 | */ | 509 | */ |
454 | op->named.data = parser_state->aml; | 510 | op->named.data = parser_state->aml; |
455 | op->named.length = (u32) (parser_state->pkg_end - | 511 | op->named.length = |
456 | parser_state->aml); | 512 | (u32) (parser_state->pkg_end - |
513 | parser_state->aml); | ||
457 | 514 | ||
458 | /* Skip body of method */ | 515 | /* Skip body of method */ |
459 | 516 | ||
460 | parser_state->aml = parser_state->pkg_end; | 517 | parser_state->aml = |
518 | parser_state->pkg_end; | ||
461 | walk_state->arg_count = 0; | 519 | walk_state->arg_count = 0; |
462 | break; | 520 | break; |
463 | 521 | ||
@@ -466,20 +524,25 @@ acpi_ps_parse_loop ( | |||
466 | case AML_VAR_PACKAGE_OP: | 524 | case AML_VAR_PACKAGE_OP: |
467 | 525 | ||
468 | if ((op->common.parent) && | 526 | if ((op->common.parent) && |
469 | (op->common.parent->common.aml_opcode == AML_NAME_OP) && | 527 | (op->common.parent->common. |
470 | (walk_state->pass_number <= ACPI_IMODE_LOAD_PASS2)) { | 528 | aml_opcode == AML_NAME_OP) |
529 | && (walk_state->pass_number <= | ||
530 | ACPI_IMODE_LOAD_PASS2)) { | ||
471 | /* | 531 | /* |
472 | * Skip parsing of Buffers and Packages | 532 | * Skip parsing of Buffers and Packages |
473 | * because we don't have enough info in the first pass | 533 | * because we don't have enough info in the first pass |
474 | * to parse them correctly. | 534 | * to parse them correctly. |
475 | */ | 535 | */ |
476 | op->named.data = aml_op_start; | 536 | op->named.data = aml_op_start; |
477 | op->named.length = (u32) (parser_state->pkg_end - | 537 | op->named.length = |
478 | aml_op_start); | 538 | (u32) (parser_state-> |
539 | pkg_end - | ||
540 | aml_op_start); | ||
479 | 541 | ||
480 | /* Skip body */ | 542 | /* Skip body */ |
481 | 543 | ||
482 | parser_state->aml = parser_state->pkg_end; | 544 | parser_state->aml = |
545 | parser_state->pkg_end; | ||
483 | walk_state->arg_count = 0; | 546 | walk_state->arg_count = 0; |
484 | } | 547 | } |
485 | break; | 548 | break; |
@@ -487,8 +550,9 @@ acpi_ps_parse_loop ( | |||
487 | case AML_WHILE_OP: | 550 | case AML_WHILE_OP: |
488 | 551 | ||
489 | if (walk_state->control_state) { | 552 | if (walk_state->control_state) { |
490 | walk_state->control_state->control.package_end = | 553 | walk_state->control_state-> |
491 | parser_state->pkg_end; | 554 | control.package_end = |
555 | parser_state->pkg_end; | ||
492 | } | 556 | } |
493 | break; | 557 | break; |
494 | 558 | ||
@@ -508,9 +572,10 @@ acpi_ps_parse_loop ( | |||
508 | * There are arguments (complex ones), push Op and | 572 | * There are arguments (complex ones), push Op and |
509 | * prepare for argument | 573 | * prepare for argument |
510 | */ | 574 | */ |
511 | status = acpi_ps_push_scope (parser_state, op, | 575 | status = acpi_ps_push_scope(parser_state, op, |
512 | walk_state->arg_types, walk_state->arg_count); | 576 | walk_state->arg_types, |
513 | if (ACPI_FAILURE (status)) { | 577 | walk_state->arg_count); |
578 | if (ACPI_FAILURE(status)) { | ||
514 | goto close_this_op; | 579 | goto close_this_op; |
515 | } | 580 | } |
516 | op = NULL; | 581 | op = NULL; |
@@ -521,7 +586,8 @@ acpi_ps_parse_loop ( | |||
521 | * All arguments have been processed -- Op is complete, | 586 | * All arguments have been processed -- Op is complete, |
522 | * prepare for next | 587 | * prepare for next |
523 | */ | 588 | */ |
524 | walk_state->op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); | 589 | walk_state->op_info = |
590 | acpi_ps_get_opcode_info(op->common.aml_opcode); | ||
525 | if (walk_state->op_info->flags & AML_NAMED) { | 591 | if (walk_state->op_info->flags & AML_NAMED) { |
526 | if (acpi_gbl_depth) { | 592 | if (acpi_gbl_depth) { |
527 | acpi_gbl_depth--; | 593 | acpi_gbl_depth--; |
@@ -536,7 +602,8 @@ acpi_ps_parse_loop ( | |||
536 | * Completed parsing an op_region declaration, we now | 602 | * Completed parsing an op_region declaration, we now |
537 | * know the length. | 603 | * know the length. |
538 | */ | 604 | */ |
539 | op->named.length = (u32) (parser_state->aml - op->named.data); | 605 | op->named.length = |
606 | (u32) (parser_state->aml - op->named.data); | ||
540 | } | 607 | } |
541 | } | 608 | } |
542 | 609 | ||
@@ -547,25 +614,26 @@ acpi_ps_parse_loop ( | |||
547 | * | 614 | * |
548 | * body_length is unknown until we parse the body | 615 | * body_length is unknown until we parse the body |
549 | */ | 616 | */ |
550 | op->named.length = (u32) (parser_state->aml - op->named.data); | 617 | op->named.length = |
618 | (u32) (parser_state->aml - op->named.data); | ||
551 | } | 619 | } |
552 | 620 | ||
553 | /* This op complete, notify the dispatcher */ | 621 | /* This op complete, notify the dispatcher */ |
554 | 622 | ||
555 | if (walk_state->ascending_callback != NULL) { | 623 | if (walk_state->ascending_callback != NULL) { |
556 | walk_state->op = op; | 624 | walk_state->op = op; |
557 | walk_state->opcode = op->common.aml_opcode; | 625 | walk_state->opcode = op->common.aml_opcode; |
558 | 626 | ||
559 | status = walk_state->ascending_callback (walk_state); | 627 | status = walk_state->ascending_callback(walk_state); |
560 | status = acpi_ps_next_parse_state (walk_state, op, status); | 628 | status = |
629 | acpi_ps_next_parse_state(walk_state, op, status); | ||
561 | if (status == AE_CTRL_PENDING) { | 630 | if (status == AE_CTRL_PENDING) { |
562 | status = AE_OK; | 631 | status = AE_OK; |
563 | goto close_this_op; | 632 | goto close_this_op; |
564 | } | 633 | } |
565 | } | 634 | } |
566 | 635 | ||
567 | 636 | close_this_op: | |
568 | close_this_op: | ||
569 | /* | 637 | /* |
570 | * Finished one argument of the containing scope | 638 | * Finished one argument of the containing scope |
571 | */ | 639 | */ |
@@ -574,15 +642,15 @@ close_this_op: | |||
574 | /* Finished with pre_op */ | 642 | /* Finished with pre_op */ |
575 | 643 | ||
576 | if (pre_op) { | 644 | if (pre_op) { |
577 | acpi_ps_free_op (pre_op); | 645 | acpi_ps_free_op(pre_op); |
578 | pre_op = NULL; | 646 | pre_op = NULL; |
579 | } | 647 | } |
580 | 648 | ||
581 | /* Close this Op (will result in parse subtree deletion) */ | 649 | /* Close this Op (will result in parse subtree deletion) */ |
582 | 650 | ||
583 | status2 = acpi_ps_complete_this_op (walk_state, op); | 651 | status2 = acpi_ps_complete_this_op(walk_state, op); |
584 | if (ACPI_FAILURE (status2)) { | 652 | if (ACPI_FAILURE(status2)) { |
585 | return_ACPI_STATUS (status2); | 653 | return_ACPI_STATUS(status2); |
586 | } | 654 | } |
587 | op = NULL; | 655 | op = NULL; |
588 | 656 | ||
@@ -590,68 +658,74 @@ close_this_op: | |||
590 | case AE_OK: | 658 | case AE_OK: |
591 | break; | 659 | break; |
592 | 660 | ||
593 | |||
594 | case AE_CTRL_TRANSFER: | 661 | case AE_CTRL_TRANSFER: |
595 | 662 | ||
596 | /* We are about to transfer to a called method. */ | 663 | /* We are about to transfer to a called method. */ |
597 | 664 | ||
598 | walk_state->prev_op = op; | 665 | walk_state->prev_op = op; |
599 | walk_state->prev_arg_types = walk_state->arg_types; | 666 | walk_state->prev_arg_types = walk_state->arg_types; |
600 | return_ACPI_STATUS (status); | 667 | return_ACPI_STATUS(status); |
601 | |||
602 | 668 | ||
603 | case AE_CTRL_END: | 669 | case AE_CTRL_END: |
604 | 670 | ||
605 | acpi_ps_pop_scope (parser_state, &op, | 671 | acpi_ps_pop_scope(parser_state, &op, |
606 | &walk_state->arg_types, &walk_state->arg_count); | 672 | &walk_state->arg_types, |
673 | &walk_state->arg_count); | ||
607 | 674 | ||
608 | if (op) { | 675 | if (op) { |
609 | walk_state->op = op; | 676 | walk_state->op = op; |
610 | walk_state->op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); | 677 | walk_state->op_info = |
678 | acpi_ps_get_opcode_info(op->common. | ||
679 | aml_opcode); | ||
611 | walk_state->opcode = op->common.aml_opcode; | 680 | walk_state->opcode = op->common.aml_opcode; |
612 | 681 | ||
613 | status = walk_state->ascending_callback (walk_state); | 682 | status = |
614 | status = acpi_ps_next_parse_state (walk_state, op, status); | 683 | walk_state->ascending_callback(walk_state); |
684 | status = | ||
685 | acpi_ps_next_parse_state(walk_state, op, | ||
686 | status); | ||
615 | 687 | ||
616 | status2 = acpi_ps_complete_this_op (walk_state, op); | 688 | status2 = |
617 | if (ACPI_FAILURE (status2)) { | 689 | acpi_ps_complete_this_op(walk_state, op); |
618 | return_ACPI_STATUS (status2); | 690 | if (ACPI_FAILURE(status2)) { |
691 | return_ACPI_STATUS(status2); | ||
619 | } | 692 | } |
620 | op = NULL; | 693 | op = NULL; |
621 | } | 694 | } |
622 | status = AE_OK; | 695 | status = AE_OK; |
623 | break; | 696 | break; |
624 | 697 | ||
625 | |||
626 | case AE_CTRL_BREAK: | 698 | case AE_CTRL_BREAK: |
627 | case AE_CTRL_CONTINUE: | 699 | case AE_CTRL_CONTINUE: |
628 | 700 | ||
629 | /* Pop off scopes until we find the While */ | 701 | /* Pop off scopes until we find the While */ |
630 | 702 | ||
631 | while (!op || (op->common.aml_opcode != AML_WHILE_OP)) { | 703 | while (!op || (op->common.aml_opcode != AML_WHILE_OP)) { |
632 | acpi_ps_pop_scope (parser_state, &op, | 704 | acpi_ps_pop_scope(parser_state, &op, |
633 | &walk_state->arg_types, &walk_state->arg_count); | 705 | &walk_state->arg_types, |
706 | &walk_state->arg_count); | ||
634 | } | 707 | } |
635 | 708 | ||
636 | /* Close this iteration of the While loop */ | 709 | /* Close this iteration of the While loop */ |
637 | 710 | ||
638 | walk_state->op = op; | 711 | walk_state->op = op; |
639 | walk_state->op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); | 712 | walk_state->op_info = |
713 | acpi_ps_get_opcode_info(op->common.aml_opcode); | ||
640 | walk_state->opcode = op->common.aml_opcode; | 714 | walk_state->opcode = op->common.aml_opcode; |
641 | 715 | ||
642 | status = walk_state->ascending_callback (walk_state); | 716 | status = walk_state->ascending_callback(walk_state); |
643 | status = acpi_ps_next_parse_state (walk_state, op, status); | 717 | status = |
718 | acpi_ps_next_parse_state(walk_state, op, status); | ||
644 | 719 | ||
645 | status2 = acpi_ps_complete_this_op (walk_state, op); | 720 | status2 = acpi_ps_complete_this_op(walk_state, op); |
646 | if (ACPI_FAILURE (status2)) { | 721 | if (ACPI_FAILURE(status2)) { |
647 | return_ACPI_STATUS (status2); | 722 | return_ACPI_STATUS(status2); |
648 | } | 723 | } |
649 | op = NULL; | 724 | op = NULL; |
650 | 725 | ||
651 | status = AE_OK; | 726 | status = AE_OK; |
652 | break; | 727 | break; |
653 | 728 | ||
654 | |||
655 | case AE_CTRL_TERMINATE: | 729 | case AE_CTRL_TERMINATE: |
656 | 730 | ||
657 | status = AE_OK; | 731 | status = AE_OK; |
@@ -659,61 +733,66 @@ close_this_op: | |||
659 | /* Clean up */ | 733 | /* Clean up */ |
660 | do { | 734 | do { |
661 | if (op) { | 735 | if (op) { |
662 | status2 = acpi_ps_complete_this_op (walk_state, op); | 736 | status2 = |
663 | if (ACPI_FAILURE (status2)) { | 737 | acpi_ps_complete_this_op(walk_state, |
664 | return_ACPI_STATUS (status2); | 738 | op); |
739 | if (ACPI_FAILURE(status2)) { | ||
740 | return_ACPI_STATUS(status2); | ||
665 | } | 741 | } |
666 | } | 742 | } |
667 | acpi_ps_pop_scope (parser_state, &op, | 743 | acpi_ps_pop_scope(parser_state, &op, |
668 | &walk_state->arg_types, &walk_state->arg_count); | 744 | &walk_state->arg_types, |
745 | &walk_state->arg_count); | ||
669 | 746 | ||
670 | } while (op); | 747 | } while (op); |
671 | 748 | ||
672 | return_ACPI_STATUS (status); | 749 | return_ACPI_STATUS(status); |
673 | 750 | ||
674 | 751 | default: /* All other non-AE_OK status */ | |
675 | default: /* All other non-AE_OK status */ | ||
676 | 752 | ||
677 | do { | 753 | do { |
678 | if (op) { | 754 | if (op) { |
679 | status2 = acpi_ps_complete_this_op (walk_state, op); | 755 | status2 = |
680 | if (ACPI_FAILURE (status2)) { | 756 | acpi_ps_complete_this_op(walk_state, |
681 | return_ACPI_STATUS (status2); | 757 | op); |
758 | if (ACPI_FAILURE(status2)) { | ||
759 | return_ACPI_STATUS(status2); | ||
682 | } | 760 | } |
683 | } | 761 | } |
684 | acpi_ps_pop_scope (parser_state, &op, | 762 | acpi_ps_pop_scope(parser_state, &op, |
685 | &walk_state->arg_types, &walk_state->arg_count); | 763 | &walk_state->arg_types, |
764 | &walk_state->arg_count); | ||
686 | 765 | ||
687 | } while (op); | 766 | } while (op); |
688 | 767 | ||
689 | |||
690 | /* | 768 | /* |
691 | * TBD: Cleanup parse ops on error | 769 | * TBD: Cleanup parse ops on error |
692 | */ | 770 | */ |
693 | #if 0 | 771 | #if 0 |
694 | if (op == NULL) { | 772 | if (op == NULL) { |
695 | acpi_ps_pop_scope (parser_state, &op, | 773 | acpi_ps_pop_scope(parser_state, &op, |
696 | &walk_state->arg_types, &walk_state->arg_count); | 774 | &walk_state->arg_types, |
775 | &walk_state->arg_count); | ||
697 | } | 776 | } |
698 | #endif | 777 | #endif |
699 | walk_state->prev_op = op; | 778 | walk_state->prev_op = op; |
700 | walk_state->prev_arg_types = walk_state->arg_types; | 779 | walk_state->prev_arg_types = walk_state->arg_types; |
701 | return_ACPI_STATUS (status); | 780 | return_ACPI_STATUS(status); |
702 | } | 781 | } |
703 | 782 | ||
704 | /* This scope complete? */ | 783 | /* This scope complete? */ |
705 | 784 | ||
706 | if (acpi_ps_has_completed_scope (parser_state)) { | 785 | if (acpi_ps_has_completed_scope(parser_state)) { |
707 | acpi_ps_pop_scope (parser_state, &op, | 786 | acpi_ps_pop_scope(parser_state, &op, |
708 | &walk_state->arg_types, &walk_state->arg_count); | 787 | &walk_state->arg_types, |
709 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", op)); | 788 | &walk_state->arg_count); |
710 | } | 789 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
711 | else { | 790 | "Popped scope, Op=%p\n", op)); |
791 | } else { | ||
712 | op = NULL; | 792 | op = NULL; |
713 | } | 793 | } |
714 | 794 | ||
715 | } /* while parser_state->Aml */ | 795 | } /* while parser_state->Aml */ |
716 | |||
717 | 796 | ||
718 | /* | 797 | /* |
719 | * Complete the last Op (if not completed), and clear the scope stack. | 798 | * Complete the last Op (if not completed), and clear the scope stack. |
@@ -721,16 +800,22 @@ close_this_op: | |||
721 | * of open scopes (such as when several ASL blocks are closed with | 800 | * of open scopes (such as when several ASL blocks are closed with |
722 | * sequential closing braces). We want to terminate each one cleanly. | 801 | * sequential closing braces). We want to terminate each one cleanly. |
723 | */ | 802 | */ |
724 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "AML package complete at Op %p\n", op)); | 803 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "AML package complete at Op %p\n", |
804 | op)); | ||
725 | do { | 805 | do { |
726 | if (op) { | 806 | if (op) { |
727 | if (walk_state->ascending_callback != NULL) { | 807 | if (walk_state->ascending_callback != NULL) { |
728 | walk_state->op = op; | 808 | walk_state->op = op; |
729 | walk_state->op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); | 809 | walk_state->op_info = |
810 | acpi_ps_get_opcode_info(op->common. | ||
811 | aml_opcode); | ||
730 | walk_state->opcode = op->common.aml_opcode; | 812 | walk_state->opcode = op->common.aml_opcode; |
731 | 813 | ||
732 | status = walk_state->ascending_callback (walk_state); | 814 | status = |
733 | status = acpi_ps_next_parse_state (walk_state, op, status); | 815 | walk_state->ascending_callback(walk_state); |
816 | status = | ||
817 | acpi_ps_next_parse_state(walk_state, op, | ||
818 | status); | ||
734 | if (status == AE_CTRL_PENDING) { | 819 | if (status == AE_CTRL_PENDING) { |
735 | status = AE_OK; | 820 | status = AE_OK; |
736 | goto close_this_op; | 821 | goto close_this_op; |
@@ -742,40 +827,48 @@ close_this_op: | |||
742 | /* Clean up */ | 827 | /* Clean up */ |
743 | do { | 828 | do { |
744 | if (op) { | 829 | if (op) { |
745 | status2 = acpi_ps_complete_this_op (walk_state, op); | 830 | status2 = |
746 | if (ACPI_FAILURE (status2)) { | 831 | acpi_ps_complete_this_op |
747 | return_ACPI_STATUS (status2); | 832 | (walk_state, op); |
833 | if (ACPI_FAILURE | ||
834 | (status2)) { | ||
835 | return_ACPI_STATUS | ||
836 | (status2); | ||
748 | } | 837 | } |
749 | } | 838 | } |
750 | 839 | ||
751 | acpi_ps_pop_scope (parser_state, &op, | 840 | acpi_ps_pop_scope(parser_state, |
752 | &walk_state->arg_types, &walk_state->arg_count); | 841 | &op, |
842 | &walk_state-> | ||
843 | arg_types, | ||
844 | &walk_state-> | ||
845 | arg_count); | ||
753 | 846 | ||
754 | } while (op); | 847 | } while (op); |
755 | 848 | ||
756 | return_ACPI_STATUS (status); | 849 | return_ACPI_STATUS(status); |
757 | } | 850 | } |
758 | 851 | ||
759 | else if (ACPI_FAILURE (status)) { | 852 | else if (ACPI_FAILURE(status)) { |
760 | /* First error is most important */ | 853 | /* First error is most important */ |
761 | 854 | ||
762 | (void) acpi_ps_complete_this_op (walk_state, op); | 855 | (void) |
763 | return_ACPI_STATUS (status); | 856 | acpi_ps_complete_this_op(walk_state, |
857 | op); | ||
858 | return_ACPI_STATUS(status); | ||
764 | } | 859 | } |
765 | } | 860 | } |
766 | 861 | ||
767 | status2 = acpi_ps_complete_this_op (walk_state, op); | 862 | status2 = acpi_ps_complete_this_op(walk_state, op); |
768 | if (ACPI_FAILURE (status2)) { | 863 | if (ACPI_FAILURE(status2)) { |
769 | return_ACPI_STATUS (status2); | 864 | return_ACPI_STATUS(status2); |
770 | } | 865 | } |
771 | } | 866 | } |
772 | 867 | ||
773 | acpi_ps_pop_scope (parser_state, &op, &walk_state->arg_types, | 868 | acpi_ps_pop_scope(parser_state, &op, &walk_state->arg_types, |
774 | &walk_state->arg_count); | 869 | &walk_state->arg_count); |
775 | 870 | ||
776 | } while (op); | 871 | } while (op); |
777 | 872 | ||
778 | return_ACPI_STATUS (status); | 873 | return_ACPI_STATUS(status); |
779 | } | 874 | } |
780 | |||
781 | |||
diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c index 6f7594a516d2..229ae86afe8b 100644 --- a/drivers/acpi/parser/psopcode.c +++ b/drivers/acpi/parser/psopcode.c | |||
@@ -41,16 +41,13 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | #include <acpi/acopcode.h> | 46 | #include <acpi/acopcode.h> |
48 | #include <acpi/amlcode.h> | 47 | #include <acpi/amlcode.h> |
49 | 48 | ||
50 | |||
51 | #define _COMPONENT ACPI_PARSER | 49 | #define _COMPONENT ACPI_PARSER |
52 | ACPI_MODULE_NAME ("psopcode") | 50 | ACPI_MODULE_NAME("psopcode") |
53 | |||
54 | 51 | ||
55 | /******************************************************************************* | 52 | /******************************************************************************* |
56 | * | 53 | * |
@@ -62,7 +59,6 @@ | |||
62 | * the operand type. | 59 | * the operand type. |
63 | * | 60 | * |
64 | ******************************************************************************/ | 61 | ******************************************************************************/ |
65 | |||
66 | /* | 62 | /* |
67 | * Summary of opcode types/flags | 63 | * Summary of opcode types/flags |
68 | * | 64 | * |
@@ -180,156 +176,468 @@ | |||
180 | AML_CREATE_QWORD_FIELD_OP | 176 | AML_CREATE_QWORD_FIELD_OP |
181 | 177 | ||
182 | ******************************************************************************/ | 178 | ******************************************************************************/ |
183 | |||
184 | |||
185 | /* | 179 | /* |
186 | * Master Opcode information table. A summary of everything we know about each | 180 | * Master Opcode information table. A summary of everything we know about each |
187 | * opcode, all in one place. | 181 | * opcode, all in one place. |
188 | */ | 182 | */ |
189 | const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = | 183 | const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = { |
190 | { | ||
191 | /*! [Begin] no source code translation */ | 184 | /*! [Begin] no source code translation */ |
192 | /* Index Name Parser Args Interpreter Args ObjectType Class Type Flags */ | 185 | /* Index Name Parser Args Interpreter Args ObjectType Class Type Flags */ |
193 | 186 | ||
194 | /* 00 */ ACPI_OP ("Zero", ARGP_ZERO_OP, ARGI_ZERO_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, AML_CONSTANT), | 187 | /* 00 */ ACPI_OP("Zero", ARGP_ZERO_OP, ARGI_ZERO_OP, ACPI_TYPE_INTEGER, |
195 | /* 01 */ ACPI_OP ("One", ARGP_ONE_OP, ARGI_ONE_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, AML_CONSTANT), | 188 | AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, AML_CONSTANT), |
196 | /* 02 */ ACPI_OP ("Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP, ACPI_TYPE_LOCAL_ALIAS, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 189 | /* 01 */ ACPI_OP("One", ARGP_ONE_OP, ARGI_ONE_OP, ACPI_TYPE_INTEGER, |
197 | /* 03 */ ACPI_OP ("Name", ARGP_NAME_OP, ARGI_NAME_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 190 | AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, AML_CONSTANT), |
198 | /* 04 */ ACPI_OP ("ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), | 191 | /* 02 */ ACPI_OP("Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP, |
199 | /* 05 */ ACPI_OP ("WordConst", ARGP_WORD_OP, ARGI_WORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), | 192 | ACPI_TYPE_LOCAL_ALIAS, AML_CLASS_NAMED_OBJECT, |
200 | /* 06 */ ACPI_OP ("DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), | 193 | AML_TYPE_NAMED_SIMPLE, |
201 | /* 07 */ ACPI_OP ("String", ARGP_STRING_OP, ARGI_STRING_OP, ACPI_TYPE_STRING, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), | 194 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | |
202 | /* 08 */ ACPI_OP ("Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_TYPE_LOCAL_SCOPE, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 195 | AML_NSNODE | AML_NAMED), |
203 | /* 09 */ ACPI_OP ("Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP, ACPI_TYPE_BUFFER, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER | AML_CONSTANT), | 196 | /* 03 */ ACPI_OP("Name", ARGP_NAME_OP, ARGI_NAME_OP, ACPI_TYPE_ANY, |
204 | /* 0A */ ACPI_OP ("Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER | AML_CONSTANT), | 197 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, |
205 | /* 0B */ ACPI_OP ("Method", ARGP_METHOD_OP, ARGI_METHOD_OP, ACPI_TYPE_METHOD, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER), | 198 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | |
206 | /* 0C */ ACPI_OP ("Local0", ARGP_LOCAL0, ARGI_LOCAL0, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 199 | AML_NSNODE | AML_NAMED), |
207 | /* 0D */ ACPI_OP ("Local1", ARGP_LOCAL1, ARGI_LOCAL1, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 200 | /* 04 */ ACPI_OP("ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP, |
208 | /* 0E */ ACPI_OP ("Local2", ARGP_LOCAL2, ARGI_LOCAL2, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 201 | ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, |
209 | /* 0F */ ACPI_OP ("Local3", ARGP_LOCAL3, ARGI_LOCAL3, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 202 | AML_TYPE_LITERAL, AML_CONSTANT), |
210 | /* 10 */ ACPI_OP ("Local4", ARGP_LOCAL4, ARGI_LOCAL4, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 203 | /* 05 */ ACPI_OP("WordConst", ARGP_WORD_OP, ARGI_WORD_OP, |
211 | /* 11 */ ACPI_OP ("Local5", ARGP_LOCAL5, ARGI_LOCAL5, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 204 | ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, |
212 | /* 12 */ ACPI_OP ("Local6", ARGP_LOCAL6, ARGI_LOCAL6, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 205 | AML_TYPE_LITERAL, AML_CONSTANT), |
213 | /* 13 */ ACPI_OP ("Local7", ARGP_LOCAL7, ARGI_LOCAL7, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LOCAL_VARIABLE, 0), | 206 | /* 06 */ ACPI_OP("DwordConst", ARGP_DWORD_OP, ARGI_DWORD_OP, |
214 | /* 14 */ ACPI_OP ("Arg0", ARGP_ARG0, ARGI_ARG0, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 207 | ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, |
215 | /* 15 */ ACPI_OP ("Arg1", ARGP_ARG1, ARGI_ARG1, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 208 | AML_TYPE_LITERAL, AML_CONSTANT), |
216 | /* 16 */ ACPI_OP ("Arg2", ARGP_ARG2, ARGI_ARG2, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 209 | /* 07 */ ACPI_OP("String", ARGP_STRING_OP, ARGI_STRING_OP, |
217 | /* 17 */ ACPI_OP ("Arg3", ARGP_ARG3, ARGI_ARG3, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 210 | ACPI_TYPE_STRING, AML_CLASS_ARGUMENT, |
218 | /* 18 */ ACPI_OP ("Arg4", ARGP_ARG4, ARGI_ARG4, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 211 | AML_TYPE_LITERAL, AML_CONSTANT), |
219 | /* 19 */ ACPI_OP ("Arg5", ARGP_ARG5, ARGI_ARG5, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 212 | /* 08 */ ACPI_OP("Scope", ARGP_SCOPE_OP, ARGI_SCOPE_OP, |
220 | /* 1A */ ACPI_OP ("Arg6", ARGP_ARG6, ARGI_ARG6, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_METHOD_ARGUMENT, 0), | 213 | ACPI_TYPE_LOCAL_SCOPE, AML_CLASS_NAMED_OBJECT, |
221 | /* 1B */ ACPI_OP ("Store", ARGP_STORE_OP, ARGI_STORE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R), | 214 | AML_TYPE_NAMED_NO_OBJ, |
222 | /* 1C */ ACPI_OP ("RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R), | 215 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | |
223 | /* 1D */ ACPI_OP ("Add", ARGP_ADD_OP, ARGI_ADD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 216 | AML_NSNODE | AML_NAMED), |
224 | /* 1E */ ACPI_OP ("Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), | 217 | /* 09 */ ACPI_OP("Buffer", ARGP_BUFFER_OP, ARGI_BUFFER_OP, |
225 | /* 1F */ ACPI_OP ("Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 218 | ACPI_TYPE_BUFFER, AML_CLASS_CREATE, |
226 | /* 20 */ ACPI_OP ("Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), | 219 | AML_TYPE_CREATE_OBJECT, |
227 | /* 21 */ ACPI_OP ("Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), | 220 | AML_HAS_ARGS | AML_DEFER | AML_CONSTANT), |
228 | /* 22 */ ACPI_OP ("Multiply", ARGP_MULTIPLY_OP, ARGI_MULTIPLY_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 221 | /* 0A */ ACPI_OP("Package", ARGP_PACKAGE_OP, ARGI_PACKAGE_OP, |
229 | /* 23 */ ACPI_OP ("Divide", ARGP_DIVIDE_OP, ARGI_DIVIDE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_2T_1R, AML_FLAGS_EXEC_2A_2T_1R | AML_CONSTANT), | 222 | ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, |
230 | /* 24 */ ACPI_OP ("ShiftLeft", ARGP_SHIFT_LEFT_OP, ARGI_SHIFT_LEFT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 223 | AML_TYPE_CREATE_OBJECT, |
231 | /* 25 */ ACPI_OP ("ShiftRight", ARGP_SHIFT_RIGHT_OP, ARGI_SHIFT_RIGHT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 224 | AML_HAS_ARGS | AML_DEFER | AML_CONSTANT), |
232 | /* 26 */ ACPI_OP ("And", ARGP_BIT_AND_OP, ARGI_BIT_AND_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 225 | /* 0B */ ACPI_OP("Method", ARGP_METHOD_OP, ARGI_METHOD_OP, |
233 | /* 27 */ ACPI_OP ("NAnd", ARGP_BIT_NAND_OP, ARGI_BIT_NAND_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 226 | ACPI_TYPE_METHOD, AML_CLASS_NAMED_OBJECT, |
234 | /* 28 */ ACPI_OP ("Or", ARGP_BIT_OR_OP, ARGI_BIT_OR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 227 | AML_TYPE_NAMED_COMPLEX, |
235 | /* 29 */ ACPI_OP ("NOr", ARGP_BIT_NOR_OP, ARGI_BIT_NOR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 228 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | |
236 | /* 2A */ ACPI_OP ("XOr", ARGP_BIT_XOR_OP, ARGI_BIT_XOR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | 229 | AML_NSNODE | AML_NAMED | AML_DEFER), |
237 | /* 2B */ ACPI_OP ("Not", ARGP_BIT_NOT_OP, ARGI_BIT_NOT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 230 | /* 0C */ ACPI_OP("Local0", ARGP_LOCAL0, ARGI_LOCAL0, |
238 | /* 2C */ ACPI_OP ("FindSetLeftBit", ARGP_FIND_SET_LEFT_BIT_OP, ARGI_FIND_SET_LEFT_BIT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 231 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
239 | /* 2D */ ACPI_OP ("FindSetRightBit", ARGP_FIND_SET_RIGHT_BIT_OP,ARGI_FIND_SET_RIGHT_BIT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 232 | AML_TYPE_LOCAL_VARIABLE, 0), |
240 | /* 2E */ ACPI_OP ("DerefOf", ARGP_DEREF_OF_OP, ARGI_DEREF_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R), | 233 | /* 0D */ ACPI_OP("Local1", ARGP_LOCAL1, ARGI_LOCAL1, |
241 | /* 2F */ ACPI_OP ("Notify", ARGP_NOTIFY_OP, ARGI_NOTIFY_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_0R, AML_FLAGS_EXEC_2A_0T_0R), | 234 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
242 | /* 30 */ ACPI_OP ("SizeOf", ARGP_SIZE_OF_OP, ARGI_SIZE_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE), | 235 | AML_TYPE_LOCAL_VARIABLE, 0), |
243 | /* 31 */ ACPI_OP ("Index", ARGP_INDEX_OP, ARGI_INDEX_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R), | 236 | /* 0E */ ACPI_OP("Local2", ARGP_LOCAL2, ARGI_LOCAL2, |
244 | /* 32 */ ACPI_OP ("Match", ARGP_MATCH_OP, ARGI_MATCH_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R | AML_CONSTANT), | 237 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
245 | /* 33 */ ACPI_OP ("CreateDWordField", ARGP_CREATE_DWORD_FIELD_OP,ARGI_CREATE_DWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), | 238 | AML_TYPE_LOCAL_VARIABLE, 0), |
246 | /* 34 */ ACPI_OP ("CreateWordField", ARGP_CREATE_WORD_FIELD_OP, ARGI_CREATE_WORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), | 239 | /* 0F */ ACPI_OP("Local3", ARGP_LOCAL3, ARGI_LOCAL3, |
247 | /* 35 */ ACPI_OP ("CreateByteField", ARGP_CREATE_BYTE_FIELD_OP, ARGI_CREATE_BYTE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), | 240 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
248 | /* 36 */ ACPI_OP ("CreateBitField", ARGP_CREATE_BIT_FIELD_OP, ARGI_CREATE_BIT_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), | 241 | AML_TYPE_LOCAL_VARIABLE, 0), |
249 | /* 37 */ ACPI_OP ("ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE), | 242 | /* 10 */ ACPI_OP("Local4", ARGP_LOCAL4, ARGI_LOCAL4, |
250 | /* 38 */ ACPI_OP ("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | AML_CONSTANT), | 243 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
251 | /* 39 */ ACPI_OP ("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | AML_CONSTANT), | 244 | AML_TYPE_LOCAL_VARIABLE, 0), |
252 | /* 3A */ ACPI_OP ("LNot", ARGP_LNOT_OP, ARGI_LNOT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), | 245 | /* 11 */ ACPI_OP("Local5", ARGP_LOCAL5, ARGI_LOCAL5, |
253 | /* 3B */ ACPI_OP ("LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), | 246 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
254 | /* 3C */ ACPI_OP ("LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), | 247 | AML_TYPE_LOCAL_VARIABLE, 0), |
255 | /* 3D */ ACPI_OP ("LLess", ARGP_LLESS_OP, ARGI_LLESS_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), | 248 | /* 12 */ ACPI_OP("Local6", ARGP_LOCAL6, ARGI_LOCAL6, |
256 | /* 3E */ ACPI_OP ("If", ARGP_IF_OP, ARGI_IF_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | 249 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
257 | /* 3F */ ACPI_OP ("Else", ARGP_ELSE_OP, ARGI_ELSE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | 250 | AML_TYPE_LOCAL_VARIABLE, 0), |
258 | /* 40 */ ACPI_OP ("While", ARGP_WHILE_OP, ARGI_WHILE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | 251 | /* 13 */ ACPI_OP("Local7", ARGP_LOCAL7, ARGI_LOCAL7, |
259 | /* 41 */ ACPI_OP ("Noop", ARGP_NOOP_OP, ARGI_NOOP_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | 252 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
260 | /* 42 */ ACPI_OP ("Return", ARGP_RETURN_OP, ARGI_RETURN_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | 253 | AML_TYPE_LOCAL_VARIABLE, 0), |
261 | /* 43 */ ACPI_OP ("Break", ARGP_BREAK_OP, ARGI_BREAK_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | 254 | /* 14 */ ACPI_OP("Arg0", ARGP_ARG0, ARGI_ARG0, |
262 | /* 44 */ ACPI_OP ("BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | 255 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
263 | /* 45 */ ACPI_OP ("Ones", ARGP_ONES_OP, ARGI_ONES_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, AML_CONSTANT), | 256 | AML_TYPE_METHOD_ARGUMENT, 0), |
257 | /* 15 */ ACPI_OP("Arg1", ARGP_ARG1, ARGI_ARG1, | ||
258 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
259 | AML_TYPE_METHOD_ARGUMENT, 0), | ||
260 | /* 16 */ ACPI_OP("Arg2", ARGP_ARG2, ARGI_ARG2, | ||
261 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
262 | AML_TYPE_METHOD_ARGUMENT, 0), | ||
263 | /* 17 */ ACPI_OP("Arg3", ARGP_ARG3, ARGI_ARG3, | ||
264 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
265 | AML_TYPE_METHOD_ARGUMENT, 0), | ||
266 | /* 18 */ ACPI_OP("Arg4", ARGP_ARG4, ARGI_ARG4, | ||
267 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
268 | AML_TYPE_METHOD_ARGUMENT, 0), | ||
269 | /* 19 */ ACPI_OP("Arg5", ARGP_ARG5, ARGI_ARG5, | ||
270 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
271 | AML_TYPE_METHOD_ARGUMENT, 0), | ||
272 | /* 1A */ ACPI_OP("Arg6", ARGP_ARG6, ARGI_ARG6, | ||
273 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
274 | AML_TYPE_METHOD_ARGUMENT, 0), | ||
275 | /* 1B */ ACPI_OP("Store", ARGP_STORE_OP, ARGI_STORE_OP, ACPI_TYPE_ANY, | ||
276 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, | ||
277 | AML_FLAGS_EXEC_1A_1T_1R), | ||
278 | /* 1C */ ACPI_OP("RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP, ACPI_TYPE_ANY, | ||
279 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, | ||
280 | AML_FLAGS_EXEC_1A_0T_1R), | ||
281 | /* 1D */ ACPI_OP("Add", ARGP_ADD_OP, ARGI_ADD_OP, ACPI_TYPE_ANY, | ||
282 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, | ||
283 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
284 | /* 1E */ ACPI_OP("Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP, | ||
285 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
286 | AML_TYPE_EXEC_2A_1T_1R, | ||
287 | AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), | ||
288 | /* 1F */ ACPI_OP("Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP, | ||
289 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
290 | AML_TYPE_EXEC_2A_1T_1R, | ||
291 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
292 | /* 20 */ ACPI_OP("Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP, | ||
293 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
294 | AML_TYPE_EXEC_1A_0T_1R, | ||
295 | AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), | ||
296 | /* 21 */ ACPI_OP("Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP, | ||
297 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
298 | AML_TYPE_EXEC_1A_0T_1R, | ||
299 | AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), | ||
300 | /* 22 */ ACPI_OP("Multiply", ARGP_MULTIPLY_OP, ARGI_MULTIPLY_OP, | ||
301 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
302 | AML_TYPE_EXEC_2A_1T_1R, | ||
303 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
304 | /* 23 */ ACPI_OP("Divide", ARGP_DIVIDE_OP, ARGI_DIVIDE_OP, | ||
305 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
306 | AML_TYPE_EXEC_2A_2T_1R, | ||
307 | AML_FLAGS_EXEC_2A_2T_1R | AML_CONSTANT), | ||
308 | /* 24 */ ACPI_OP("ShiftLeft", ARGP_SHIFT_LEFT_OP, ARGI_SHIFT_LEFT_OP, | ||
309 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
310 | AML_TYPE_EXEC_2A_1T_1R, | ||
311 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
312 | /* 25 */ ACPI_OP("ShiftRight", ARGP_SHIFT_RIGHT_OP, ARGI_SHIFT_RIGHT_OP, | ||
313 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
314 | AML_TYPE_EXEC_2A_1T_1R, | ||
315 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
316 | /* 26 */ ACPI_OP("And", ARGP_BIT_AND_OP, ARGI_BIT_AND_OP, ACPI_TYPE_ANY, | ||
317 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, | ||
318 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
319 | /* 27 */ ACPI_OP("NAnd", ARGP_BIT_NAND_OP, ARGI_BIT_NAND_OP, | ||
320 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
321 | AML_TYPE_EXEC_2A_1T_1R, | ||
322 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
323 | /* 28 */ ACPI_OP("Or", ARGP_BIT_OR_OP, ARGI_BIT_OR_OP, ACPI_TYPE_ANY, | ||
324 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, | ||
325 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
326 | /* 29 */ ACPI_OP("NOr", ARGP_BIT_NOR_OP, ARGI_BIT_NOR_OP, ACPI_TYPE_ANY, | ||
327 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, | ||
328 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
329 | /* 2A */ ACPI_OP("XOr", ARGP_BIT_XOR_OP, ARGI_BIT_XOR_OP, ACPI_TYPE_ANY, | ||
330 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, | ||
331 | AML_FLAGS_EXEC_2A_1T_1R | AML_MATH | AML_CONSTANT), | ||
332 | /* 2B */ ACPI_OP("Not", ARGP_BIT_NOT_OP, ARGI_BIT_NOT_OP, ACPI_TYPE_ANY, | ||
333 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, | ||
334 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
335 | /* 2C */ ACPI_OP("FindSetLeftBit", ARGP_FIND_SET_LEFT_BIT_OP, | ||
336 | ARGI_FIND_SET_LEFT_BIT_OP, ACPI_TYPE_ANY, | ||
337 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, | ||
338 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
339 | /* 2D */ ACPI_OP("FindSetRightBit", ARGP_FIND_SET_RIGHT_BIT_OP, | ||
340 | ARGI_FIND_SET_RIGHT_BIT_OP, ACPI_TYPE_ANY, | ||
341 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, | ||
342 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
343 | /* 2E */ ACPI_OP("DerefOf", ARGP_DEREF_OF_OP, ARGI_DEREF_OF_OP, | ||
344 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
345 | AML_TYPE_EXEC_1A_0T_1R, AML_FLAGS_EXEC_1A_0T_1R), | ||
346 | /* 2F */ ACPI_OP("Notify", ARGP_NOTIFY_OP, ARGI_NOTIFY_OP, | ||
347 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
348 | AML_TYPE_EXEC_2A_0T_0R, AML_FLAGS_EXEC_2A_0T_0R), | ||
349 | /* 30 */ ACPI_OP("SizeOf", ARGP_SIZE_OF_OP, ARGI_SIZE_OF_OP, | ||
350 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
351 | AML_TYPE_EXEC_1A_0T_1R, | ||
352 | AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE), | ||
353 | /* 31 */ ACPI_OP("Index", ARGP_INDEX_OP, ARGI_INDEX_OP, ACPI_TYPE_ANY, | ||
354 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, | ||
355 | AML_FLAGS_EXEC_2A_1T_1R), | ||
356 | /* 32 */ ACPI_OP("Match", ARGP_MATCH_OP, ARGI_MATCH_OP, ACPI_TYPE_ANY, | ||
357 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, | ||
358 | AML_FLAGS_EXEC_6A_0T_1R | AML_CONSTANT), | ||
359 | /* 33 */ ACPI_OP("CreateDWordField", ARGP_CREATE_DWORD_FIELD_OP, | ||
360 | ARGI_CREATE_DWORD_FIELD_OP, | ||
361 | ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, | ||
362 | AML_TYPE_CREATE_FIELD, | ||
363 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | | ||
364 | AML_DEFER | AML_CREATE), | ||
365 | /* 34 */ ACPI_OP("CreateWordField", ARGP_CREATE_WORD_FIELD_OP, | ||
366 | ARGI_CREATE_WORD_FIELD_OP, | ||
367 | ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, | ||
368 | AML_TYPE_CREATE_FIELD, | ||
369 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | | ||
370 | AML_DEFER | AML_CREATE), | ||
371 | /* 35 */ ACPI_OP("CreateByteField", ARGP_CREATE_BYTE_FIELD_OP, | ||
372 | ARGI_CREATE_BYTE_FIELD_OP, | ||
373 | ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, | ||
374 | AML_TYPE_CREATE_FIELD, | ||
375 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | | ||
376 | AML_DEFER | AML_CREATE), | ||
377 | /* 36 */ ACPI_OP("CreateBitField", ARGP_CREATE_BIT_FIELD_OP, | ||
378 | ARGI_CREATE_BIT_FIELD_OP, | ||
379 | ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, | ||
380 | AML_TYPE_CREATE_FIELD, | ||
381 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | | ||
382 | AML_DEFER | AML_CREATE), | ||
383 | /* 37 */ ACPI_OP("ObjectType", ARGP_TYPE_OP, ARGI_TYPE_OP, | ||
384 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
385 | AML_TYPE_EXEC_1A_0T_1R, | ||
386 | AML_FLAGS_EXEC_1A_0T_1R | AML_NO_OPERAND_RESOLVE), | ||
387 | /* 38 */ ACPI_OP("LAnd", ARGP_LAND_OP, ARGI_LAND_OP, ACPI_TYPE_ANY, | ||
388 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, | ||
389 | AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | | ||
390 | AML_CONSTANT), | ||
391 | /* 39 */ ACPI_OP("LOr", ARGP_LOR_OP, ARGI_LOR_OP, ACPI_TYPE_ANY, | ||
392 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, | ||
393 | AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL_NUMERIC | | ||
394 | AML_CONSTANT), | ||
395 | /* 3A */ ACPI_OP("LNot", ARGP_LNOT_OP, ARGI_LNOT_OP, ACPI_TYPE_ANY, | ||
396 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_1R, | ||
397 | AML_FLAGS_EXEC_1A_0T_1R | AML_CONSTANT), | ||
398 | /* 3B */ ACPI_OP("LEqual", ARGP_LEQUAL_OP, ARGI_LEQUAL_OP, | ||
399 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
400 | AML_TYPE_EXEC_2A_0T_1R, | ||
401 | AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), | ||
402 | /* 3C */ ACPI_OP("LGreater", ARGP_LGREATER_OP, ARGI_LGREATER_OP, | ||
403 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
404 | AML_TYPE_EXEC_2A_0T_1R, | ||
405 | AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), | ||
406 | /* 3D */ ACPI_OP("LLess", ARGP_LLESS_OP, ARGI_LLESS_OP, ACPI_TYPE_ANY, | ||
407 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, | ||
408 | AML_FLAGS_EXEC_2A_0T_1R | AML_LOGICAL | AML_CONSTANT), | ||
409 | /* 3E */ ACPI_OP("If", ARGP_IF_OP, ARGI_IF_OP, ACPI_TYPE_ANY, | ||
410 | AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | ||
411 | /* 3F */ ACPI_OP("Else", ARGP_ELSE_OP, ARGI_ELSE_OP, ACPI_TYPE_ANY, | ||
412 | AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | ||
413 | /* 40 */ ACPI_OP("While", ARGP_WHILE_OP, ARGI_WHILE_OP, ACPI_TYPE_ANY, | ||
414 | AML_CLASS_CONTROL, AML_TYPE_CONTROL, AML_HAS_ARGS), | ||
415 | /* 41 */ ACPI_OP("Noop", ARGP_NOOP_OP, ARGI_NOOP_OP, ACPI_TYPE_ANY, | ||
416 | AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | ||
417 | /* 42 */ ACPI_OP("Return", ARGP_RETURN_OP, ARGI_RETURN_OP, | ||
418 | ACPI_TYPE_ANY, AML_CLASS_CONTROL, | ||
419 | AML_TYPE_CONTROL, AML_HAS_ARGS), | ||
420 | /* 43 */ ACPI_OP("Break", ARGP_BREAK_OP, ARGI_BREAK_OP, ACPI_TYPE_ANY, | ||
421 | AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | ||
422 | /* 44 */ ACPI_OP("BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP, | ||
423 | ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | ||
424 | /* 45 */ ACPI_OP("Ones", ARGP_ONES_OP, ARGI_ONES_OP, ACPI_TYPE_INTEGER, | ||
425 | AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, AML_CONSTANT), | ||
264 | 426 | ||
265 | /* Prefixed opcodes (Two-byte opcodes with a prefix op) */ | 427 | /* Prefixed opcodes (Two-byte opcodes with a prefix op) */ |
266 | 428 | ||
267 | /* 46 */ ACPI_OP ("Mutex", ARGP_MUTEX_OP, ARGI_MUTEX_OP, ACPI_TYPE_MUTEX, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 429 | /* 46 */ ACPI_OP("Mutex", ARGP_MUTEX_OP, ARGI_MUTEX_OP, ACPI_TYPE_MUTEX, |
268 | /* 47 */ ACPI_OP ("Event", ARGP_EVENT_OP, ARGI_EVENT_OP, ACPI_TYPE_EVENT, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ), | 430 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, |
269 | /* 48 */ ACPI_OP ("CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R), | 431 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | |
270 | /* 49 */ ACPI_OP ("CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_FIELD | AML_CREATE), | 432 | AML_NSNODE | AML_NAMED), |
271 | /* 4A */ ACPI_OP ("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_0R, AML_FLAGS_EXEC_1A_1T_0R), | 433 | /* 47 */ ACPI_OP("Event", ARGP_EVENT_OP, ARGI_EVENT_OP, ACPI_TYPE_EVENT, |
272 | /* 4B */ ACPI_OP ("Stall", ARGP_STALL_OP, ARGI_STALL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | 434 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, |
273 | /* 4C */ ACPI_OP ("Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | 435 | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), |
274 | /* 4D */ ACPI_OP ("Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R), | 436 | /* 48 */ ACPI_OP("CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP, |
275 | /* 4E */ ACPI_OP ("Signal", ARGP_SIGNAL_OP, ARGI_SIGNAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | 437 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, |
276 | /* 4F */ ACPI_OP ("Wait", ARGP_WAIT_OP, ARGI_WAIT_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R), | 438 | AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R), |
277 | /* 50 */ ACPI_OP ("Reset", ARGP_RESET_OP, ARGI_RESET_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | 439 | /* 49 */ ACPI_OP("CreateField", ARGP_CREATE_FIELD_OP, |
278 | /* 51 */ ACPI_OP ("Release", ARGP_RELEASE_OP, ARGI_RELEASE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | 440 | ARGI_CREATE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, |
279 | /* 52 */ ACPI_OP ("FromBCD", ARGP_FROM_BCD_OP, ARGI_FROM_BCD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 441 | AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, |
280 | /* 53 */ ACPI_OP ("ToBCD", ARGP_TO_BCD_OP, ARGI_TO_BCD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 442 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | |
281 | /* 54 */ ACPI_OP ("Unload", ARGP_UNLOAD_OP, ARGI_UNLOAD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | 443 | AML_DEFER | AML_FIELD | AML_CREATE), |
282 | /* 55 */ ACPI_OP ("Revision", ARGP_REVISION_OP, ARGI_REVISION_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, 0), | 444 | /* 4A */ ACPI_OP("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_TYPE_ANY, |
283 | /* 56 */ ACPI_OP ("Debug", ARGP_DEBUG_OP, ARGI_DEBUG_OP, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_CONSTANT, 0), | 445 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_0R, |
284 | /* 57 */ ACPI_OP ("Fatal", ARGP_FATAL_OP, ARGI_FATAL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R), | 446 | AML_FLAGS_EXEC_1A_1T_0R), |
285 | /* 58 */ ACPI_OP ("OperationRegion", ARGP_REGION_OP, ARGI_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER), | 447 | /* 4B */ ACPI_OP("Stall", ARGP_STALL_OP, ARGI_STALL_OP, ACPI_TYPE_ANY, |
286 | /* 59 */ ACPI_OP ("Field", ARGP_FIELD_OP, ARGI_FIELD_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 448 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, |
287 | /* 5A */ ACPI_OP ("Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP, ACPI_TYPE_DEVICE, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 449 | AML_FLAGS_EXEC_1A_0T_0R), |
288 | /* 5B */ ACPI_OP ("Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP, ACPI_TYPE_PROCESSOR, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 450 | /* 4C */ ACPI_OP("Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP, ACPI_TYPE_ANY, |
289 | /* 5C */ ACPI_OP ("PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP, ACPI_TYPE_POWER, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 451 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, |
290 | /* 5D */ ACPI_OP ("ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP, ACPI_TYPE_THERMAL, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 452 | AML_FLAGS_EXEC_1A_0T_0R), |
291 | /* 5E */ ACPI_OP ("IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 453 | /* 4D */ ACPI_OP("Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP, |
292 | /* 5F */ ACPI_OP ("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 454 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, |
455 | AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R), | ||
456 | /* 4E */ ACPI_OP("Signal", ARGP_SIGNAL_OP, ARGI_SIGNAL_OP, | ||
457 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
458 | AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | ||
459 | /* 4F */ ACPI_OP("Wait", ARGP_WAIT_OP, ARGI_WAIT_OP, ACPI_TYPE_ANY, | ||
460 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, | ||
461 | AML_FLAGS_EXEC_2A_0T_1R), | ||
462 | /* 50 */ ACPI_OP("Reset", ARGP_RESET_OP, ARGI_RESET_OP, ACPI_TYPE_ANY, | ||
463 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, | ||
464 | AML_FLAGS_EXEC_1A_0T_0R), | ||
465 | /* 51 */ ACPI_OP("Release", ARGP_RELEASE_OP, ARGI_RELEASE_OP, | ||
466 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
467 | AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | ||
468 | /* 52 */ ACPI_OP("FromBCD", ARGP_FROM_BCD_OP, ARGI_FROM_BCD_OP, | ||
469 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
470 | AML_TYPE_EXEC_1A_1T_1R, | ||
471 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
472 | /* 53 */ ACPI_OP("ToBCD", ARGP_TO_BCD_OP, ARGI_TO_BCD_OP, ACPI_TYPE_ANY, | ||
473 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, | ||
474 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
475 | /* 54 */ ACPI_OP("Unload", ARGP_UNLOAD_OP, ARGI_UNLOAD_OP, | ||
476 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
477 | AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R), | ||
478 | /* 55 */ ACPI_OP("Revision", ARGP_REVISION_OP, ARGI_REVISION_OP, | ||
479 | ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, | ||
480 | AML_TYPE_CONSTANT, 0), | ||
481 | /* 56 */ ACPI_OP("Debug", ARGP_DEBUG_OP, ARGI_DEBUG_OP, | ||
482 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, | ||
483 | AML_TYPE_CONSTANT, 0), | ||
484 | /* 57 */ ACPI_OP("Fatal", ARGP_FATAL_OP, ARGI_FATAL_OP, ACPI_TYPE_ANY, | ||
485 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_3A_0T_0R, | ||
486 | AML_FLAGS_EXEC_3A_0T_0R), | ||
487 | /* 58 */ ACPI_OP("OperationRegion", ARGP_REGION_OP, ARGI_REGION_OP, | ||
488 | ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, | ||
489 | AML_TYPE_NAMED_COMPLEX, | ||
490 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
491 | AML_NSNODE | AML_NAMED | AML_DEFER), | ||
492 | /* 59 */ ACPI_OP("Field", ARGP_FIELD_OP, ARGI_FIELD_OP, ACPI_TYPE_ANY, | ||
493 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, | ||
494 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
495 | AML_FIELD), | ||
496 | /* 5A */ ACPI_OP("Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP, | ||
497 | ACPI_TYPE_DEVICE, AML_CLASS_NAMED_OBJECT, | ||
498 | AML_TYPE_NAMED_NO_OBJ, | ||
499 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
500 | AML_NSNODE | AML_NAMED), | ||
501 | /* 5B */ ACPI_OP("Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP, | ||
502 | ACPI_TYPE_PROCESSOR, AML_CLASS_NAMED_OBJECT, | ||
503 | AML_TYPE_NAMED_SIMPLE, | ||
504 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
505 | AML_NSNODE | AML_NAMED), | ||
506 | /* 5C */ ACPI_OP("PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP, | ||
507 | ACPI_TYPE_POWER, AML_CLASS_NAMED_OBJECT, | ||
508 | AML_TYPE_NAMED_SIMPLE, | ||
509 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
510 | AML_NSNODE | AML_NAMED), | ||
511 | /* 5D */ ACPI_OP("ThermalZone", ARGP_THERMAL_ZONE_OP, | ||
512 | ARGI_THERMAL_ZONE_OP, ACPI_TYPE_THERMAL, | ||
513 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, | ||
514 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
515 | AML_NSNODE | AML_NAMED), | ||
516 | /* 5E */ ACPI_OP("IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP, | ||
517 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, | ||
518 | AML_TYPE_NAMED_FIELD, | ||
519 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
520 | AML_FIELD), | ||
521 | /* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, | ||
522 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, | ||
523 | AML_TYPE_NAMED_FIELD, | ||
524 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
525 | AML_FIELD), | ||
293 | 526 | ||
294 | /* Internal opcodes that map to invalid AML opcodes */ | 527 | /* Internal opcodes that map to invalid AML opcodes */ |
295 | 528 | ||
296 | /* 60 */ ACPI_OP ("LNotEqual", ARGP_LNOTEQUAL_OP, ARGI_LNOTEQUAL_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS | AML_CONSTANT), | 529 | /* 60 */ ACPI_OP("LNotEqual", ARGP_LNOTEQUAL_OP, ARGI_LNOTEQUAL_OP, |
297 | /* 61 */ ACPI_OP ("LLessEqual", ARGP_LLESSEQUAL_OP, ARGI_LLESSEQUAL_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS | AML_CONSTANT), | 530 | ACPI_TYPE_ANY, AML_CLASS_INTERNAL, |
298 | /* 62 */ ACPI_OP ("LGreaterEqual", ARGP_LGREATEREQUAL_OP, ARGI_LGREATEREQUAL_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS | AML_CONSTANT), | 531 | AML_TYPE_BOGUS, AML_HAS_ARGS | AML_CONSTANT), |
299 | /* 63 */ ACPI_OP ("-NamePath-", ARGP_NAMEPATH_OP, ARGI_NAMEPATH_OP, ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_NSOBJECT | AML_NSNODE ), | 532 | /* 61 */ ACPI_OP("LLessEqual", ARGP_LLESSEQUAL_OP, ARGI_LLESSEQUAL_OP, |
300 | /* 64 */ ACPI_OP ("-MethodCall-", ARGP_METHODCALL_OP, ARGI_METHODCALL_OP, ACPI_TYPE_METHOD, AML_CLASS_METHOD_CALL, AML_TYPE_METHOD_CALL, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE), | 533 | ACPI_TYPE_ANY, AML_CLASS_INTERNAL, |
301 | /* 65 */ ACPI_OP ("-ByteList-", ARGP_BYTELIST_OP, ARGI_BYTELIST_OP, ACPI_TYPE_ANY, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, 0), | 534 | AML_TYPE_BOGUS, AML_HAS_ARGS | AML_CONSTANT), |
302 | /* 66 */ ACPI_OP ("-ReservedField-", ARGP_RESERVEDFIELD_OP, ARGI_RESERVEDFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), | 535 | /* 62 */ ACPI_OP("LGreaterEqual", ARGP_LGREATEREQUAL_OP, |
303 | /* 67 */ ACPI_OP ("-NamedField-", ARGP_NAMEDFIELD_OP, ARGI_NAMEDFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ), | 536 | ARGI_LGREATEREQUAL_OP, ACPI_TYPE_ANY, |
304 | /* 68 */ ACPI_OP ("-AccessField-", ARGP_ACCESSFIELD_OP, ARGI_ACCESSFIELD_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), | 537 | AML_CLASS_INTERNAL, AML_TYPE_BOGUS, |
305 | /* 69 */ ACPI_OP ("-StaticString", ARGP_STATICSTRING_OP, ARGI_STATICSTRING_OP, ACPI_TYPE_ANY, AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), | 538 | AML_HAS_ARGS | AML_CONSTANT), |
306 | /* 6A */ ACPI_OP ("-Return Value-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, AML_CLASS_RETURN_VALUE, AML_TYPE_RETURN, AML_HAS_ARGS | AML_HAS_RETVAL), | 539 | /* 63 */ ACPI_OP("-NamePath-", ARGP_NAMEPATH_OP, ARGI_NAMEPATH_OP, |
307 | /* 6B */ ACPI_OP ("-UNKNOWN_OP-", ARG_NONE, ARG_NONE, ACPI_TYPE_INVALID, AML_CLASS_UNKNOWN, AML_TYPE_BOGUS, AML_HAS_ARGS), | 540 | ACPI_TYPE_LOCAL_REFERENCE, AML_CLASS_ARGUMENT, |
308 | /* 6C */ ACPI_OP ("-ASCII_ONLY-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, AML_CLASS_ASCII, AML_TYPE_BOGUS, AML_HAS_ARGS), | 541 | AML_TYPE_LITERAL, AML_NSOBJECT | AML_NSNODE), |
309 | /* 6D */ ACPI_OP ("-PREFIX_ONLY-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, AML_CLASS_PREFIX, AML_TYPE_BOGUS, AML_HAS_ARGS), | 542 | /* 64 */ ACPI_OP("-MethodCall-", ARGP_METHODCALL_OP, ARGI_METHODCALL_OP, |
543 | ACPI_TYPE_METHOD, AML_CLASS_METHOD_CALL, | ||
544 | AML_TYPE_METHOD_CALL, | ||
545 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE), | ||
546 | /* 65 */ ACPI_OP("-ByteList-", ARGP_BYTELIST_OP, ARGI_BYTELIST_OP, | ||
547 | ACPI_TYPE_ANY, AML_CLASS_ARGUMENT, | ||
548 | AML_TYPE_LITERAL, 0), | ||
549 | /* 66 */ ACPI_OP("-ReservedField-", ARGP_RESERVEDFIELD_OP, | ||
550 | ARGI_RESERVEDFIELD_OP, ACPI_TYPE_ANY, | ||
551 | AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), | ||
552 | /* 67 */ ACPI_OP("-NamedField-", ARGP_NAMEDFIELD_OP, ARGI_NAMEDFIELD_OP, | ||
553 | ACPI_TYPE_ANY, AML_CLASS_INTERNAL, | ||
554 | AML_TYPE_BOGUS, | ||
555 | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | ||
556 | /* 68 */ ACPI_OP("-AccessField-", ARGP_ACCESSFIELD_OP, | ||
557 | ARGI_ACCESSFIELD_OP, ACPI_TYPE_ANY, | ||
558 | AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), | ||
559 | /* 69 */ ACPI_OP("-StaticString", ARGP_STATICSTRING_OP, | ||
560 | ARGI_STATICSTRING_OP, ACPI_TYPE_ANY, | ||
561 | AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0), | ||
562 | /* 6A */ ACPI_OP("-Return Value-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, | ||
563 | AML_CLASS_RETURN_VALUE, AML_TYPE_RETURN, | ||
564 | AML_HAS_ARGS | AML_HAS_RETVAL), | ||
565 | /* 6B */ ACPI_OP("-UNKNOWN_OP-", ARG_NONE, ARG_NONE, ACPI_TYPE_INVALID, | ||
566 | AML_CLASS_UNKNOWN, AML_TYPE_BOGUS, AML_HAS_ARGS), | ||
567 | /* 6C */ ACPI_OP("-ASCII_ONLY-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, | ||
568 | AML_CLASS_ASCII, AML_TYPE_BOGUS, AML_HAS_ARGS), | ||
569 | /* 6D */ ACPI_OP("-PREFIX_ONLY-", ARG_NONE, ARG_NONE, ACPI_TYPE_ANY, | ||
570 | AML_CLASS_PREFIX, AML_TYPE_BOGUS, AML_HAS_ARGS), | ||
310 | 571 | ||
311 | /* ACPI 2.0 opcodes */ | 572 | /* ACPI 2.0 opcodes */ |
312 | 573 | ||
313 | /* 6E */ ACPI_OP ("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), | 574 | /* 6E */ ACPI_OP("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, |
314 | /* 6F */ ACPI_OP ("Package", /* Var */ ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER), | 575 | ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, |
315 | /* 70 */ ACPI_OP ("ConcatenateResTemplate", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), | 576 | AML_TYPE_LITERAL, AML_CONSTANT), |
316 | /* 71 */ ACPI_OP ("Mod", ARGP_MOD_OP, ARGI_MOD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), | 577 | /* 6F */ ACPI_OP("Package", /* Var */ ARGP_VAR_PACKAGE_OP, |
317 | /* 72 */ ACPI_OP ("CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), | 578 | ARGI_VAR_PACKAGE_OP, ACPI_TYPE_PACKAGE, |
318 | /* 73 */ ACPI_OP ("ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 579 | AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, |
319 | /* 74 */ ACPI_OP ("ToDecimalString", ARGP_TO_DEC_STR_OP, ARGI_TO_DEC_STR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 580 | AML_HAS_ARGS | AML_DEFER), |
320 | /* 75 */ ACPI_OP ("ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 581 | /* 70 */ ACPI_OP("ConcatenateResTemplate", ARGP_CONCAT_RES_OP, |
321 | /* 76 */ ACPI_OP ("ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | 582 | ARGI_CONCAT_RES_OP, ACPI_TYPE_ANY, |
322 | /* 77 */ ACPI_OP ("ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), | 583 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, |
323 | /* 78 */ ACPI_OP ("CopyObject", ARGP_COPY_OP, ARGI_COPY_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R), | 584 | AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), |
324 | /* 79 */ ACPI_OP ("Mid", ARGP_MID_OP, ARGI_MID_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_3A_1T_1R, AML_FLAGS_EXEC_3A_1T_1R | AML_CONSTANT), | 585 | /* 71 */ ACPI_OP("Mod", ARGP_MOD_OP, ARGI_MOD_OP, ACPI_TYPE_ANY, |
325 | /* 7A */ ACPI_OP ("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | 586 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, |
326 | /* 7B */ ACPI_OP ("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R), | 587 | AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), |
327 | /* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED), | 588 | /* 72 */ ACPI_OP("CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP, |
328 | /* 7D */ ACPI_OP ("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE), | 589 | ARGI_CREATE_QWORD_FIELD_OP, |
590 | ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, | ||
591 | AML_TYPE_CREATE_FIELD, | ||
592 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | | ||
593 | AML_DEFER | AML_CREATE), | ||
594 | /* 73 */ ACPI_OP("ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP, | ||
595 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
596 | AML_TYPE_EXEC_1A_1T_1R, | ||
597 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
598 | /* 74 */ ACPI_OP("ToDecimalString", ARGP_TO_DEC_STR_OP, | ||
599 | ARGI_TO_DEC_STR_OP, ACPI_TYPE_ANY, | ||
600 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, | ||
601 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
602 | /* 75 */ ACPI_OP("ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP, | ||
603 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
604 | AML_TYPE_EXEC_1A_1T_1R, | ||
605 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
606 | /* 76 */ ACPI_OP("ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP, | ||
607 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
608 | AML_TYPE_EXEC_1A_1T_1R, | ||
609 | AML_FLAGS_EXEC_1A_1T_1R | AML_CONSTANT), | ||
610 | /* 77 */ ACPI_OP("ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP, | ||
611 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
612 | AML_TYPE_EXEC_2A_1T_1R, | ||
613 | AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), | ||
614 | /* 78 */ ACPI_OP("CopyObject", ARGP_COPY_OP, ARGI_COPY_OP, | ||
615 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
616 | AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R), | ||
617 | /* 79 */ ACPI_OP("Mid", ARGP_MID_OP, ARGI_MID_OP, ACPI_TYPE_ANY, | ||
618 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_3A_1T_1R, | ||
619 | AML_FLAGS_EXEC_3A_1T_1R | AML_CONSTANT), | ||
620 | /* 7A */ ACPI_OP("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, | ||
621 | ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0), | ||
622 | /* 7B */ ACPI_OP("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, | ||
623 | ACPI_TYPE_ANY, AML_CLASS_EXECUTE, | ||
624 | AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R), | ||
625 | /* 7C */ ACPI_OP("DataTableRegion", ARGP_DATA_REGION_OP, | ||
626 | ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, | ||
627 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, | ||
628 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
629 | AML_NSNODE | AML_NAMED), | ||
630 | /* 7D */ ACPI_OP("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, | ||
631 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, | ||
632 | AML_TYPE_NAMED_NO_OBJ, | ||
633 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | ||
634 | AML_NSNODE), | ||
329 | 635 | ||
330 | /* ACPI 3.0 opcodes */ | 636 | /* ACPI 3.0 opcodes */ |
331 | 637 | ||
332 | /* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R) | 638 | /* 7E */ ACPI_OP("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, |
639 | AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, | ||
640 | AML_FLAGS_EXEC_0A_0T_1R) | ||
333 | 641 | ||
334 | /*! [End] no source code translation !*/ | 642 | /*! [End] no source code translation !*/ |
335 | }; | 643 | }; |
@@ -338,73 +646,70 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = | |||
338 | * This table is directly indexed by the opcodes, and returns an | 646 | * This table is directly indexed by the opcodes, and returns an |
339 | * index into the table above | 647 | * index into the table above |
340 | */ | 648 | */ |
341 | static const u8 acpi_gbl_short_op_index[256] = | 649 | static const u8 acpi_gbl_short_op_index[256] = { |
342 | { | ||
343 | /* 0 1 2 3 4 5 6 7 */ | 650 | /* 0 1 2 3 4 5 6 7 */ |
344 | /* 8 9 A B C D E F */ | 651 | /* 8 9 A B C D E F */ |
345 | /* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK, | 652 | /* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK, |
346 | /* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK, | 653 | /* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK, |
347 | /* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK, | 654 | /* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK, |
348 | /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 655 | /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
349 | /* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 656 | /* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
350 | /* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX, | 657 | /* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX, |
351 | /* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, 0x7D, | 658 | /* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, 0x7D, |
352 | /* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 659 | /* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
353 | /* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, | 660 | /* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, |
354 | /* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, | 661 | /* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, |
355 | /* 0x50 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, | 662 | /* 0x50 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, |
356 | /* 0x58 */ _ASC, _ASC, _ASC, _UNK, _PFX, _UNK, _PFX, _ASC, | 663 | /* 0x58 */ _ASC, _ASC, _ASC, _UNK, _PFX, _UNK, _PFX, _ASC, |
357 | /* 0x60 */ 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, | 664 | /* 0x60 */ 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, |
358 | /* 0x68 */ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, _UNK, | 665 | /* 0x68 */ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, _UNK, |
359 | /* 0x70 */ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, | 666 | /* 0x70 */ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, |
360 | /* 0x78 */ 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, | 667 | /* 0x78 */ 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, |
361 | /* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, 0x70, 0x71, 0x2f, 0x30, | 668 | /* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, 0x70, 0x71, 0x2f, 0x30, |
362 | /* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x72, | 669 | /* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x72, |
363 | /* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x73, 0x74, | 670 | /* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x73, 0x74, |
364 | /* 0x98 */ 0x75, 0x76, _UNK, _UNK, 0x77, 0x78, 0x79, 0x7A, | 671 | /* 0x98 */ 0x75, 0x76, _UNK, _UNK, 0x77, 0x78, 0x79, 0x7A, |
365 | /* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61, | 672 | /* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61, |
366 | /* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 673 | /* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
367 | /* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 674 | /* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
368 | /* 0xB8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 675 | /* 0xB8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
369 | /* 0xC0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 676 | /* 0xC0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
370 | /* 0xC8 */ _UNK, _UNK, _UNK, _UNK, 0x44, _UNK, _UNK, _UNK, | 677 | /* 0xC8 */ _UNK, _UNK, _UNK, _UNK, 0x44, _UNK, _UNK, _UNK, |
371 | /* 0xD0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 678 | /* 0xD0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
372 | /* 0xD8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 679 | /* 0xD8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
373 | /* 0xE0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 680 | /* 0xE0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
374 | /* 0xE8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 681 | /* 0xE8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
375 | /* 0xF0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 682 | /* 0xF0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
376 | /* 0xF8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x45, | 683 | /* 0xF8 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x45, |
377 | }; | 684 | }; |
378 | 685 | ||
379 | /* | 686 | /* |
380 | * This table is indexed by the second opcode of the extended opcode | 687 | * This table is indexed by the second opcode of the extended opcode |
381 | * pair. It returns an index into the opcode table (acpi_gbl_aml_op_info) | 688 | * pair. It returns an index into the opcode table (acpi_gbl_aml_op_info) |
382 | */ | 689 | */ |
383 | static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = | 690 | static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = { |
384 | { | ||
385 | /* 0 1 2 3 4 5 6 7 */ | 691 | /* 0 1 2 3 4 5 6 7 */ |
386 | /* 8 9 A B C D E F */ | 692 | /* 8 9 A B C D E F */ |
387 | /* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK, | 693 | /* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK, |
388 | /* 0x08 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 694 | /* 0x08 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
389 | /* 0x10 */ _UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK, | 695 | /* 0x10 */ _UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK, |
390 | /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B, | 696 | /* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B, |
391 | /* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, | 697 | /* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, |
392 | /* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK, | 698 | /* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK, |
393 | /* 0x30 */ 0x55, 0x56, 0x57, 0x7e, _UNK, _UNK, _UNK, _UNK, | 699 | /* 0x30 */ 0x55, 0x56, 0x57, 0x7e, _UNK, _UNK, _UNK, _UNK, |
394 | /* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 700 | /* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
395 | /* 0x40 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 701 | /* 0x40 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
396 | /* 0x48 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 702 | /* 0x48 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
397 | /* 0x50 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 703 | /* 0x50 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
398 | /* 0x58 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 704 | /* 0x58 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
399 | /* 0x60 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 705 | /* 0x60 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
400 | /* 0x68 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 706 | /* 0x68 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
401 | /* 0x70 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 707 | /* 0x70 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
402 | /* 0x78 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, | 708 | /* 0x78 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, |
403 | /* 0x80 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, | 709 | /* 0x80 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, |
404 | /* 0x88 */ 0x7C, | 710 | /* 0x88 */ 0x7C, |
405 | }; | 711 | }; |
406 | 712 | ||
407 | |||
408 | /******************************************************************************* | 713 | /******************************************************************************* |
409 | * | 714 | * |
410 | * FUNCTION: acpi_ps_get_opcode_info | 715 | * FUNCTION: acpi_ps_get_opcode_info |
@@ -418,12 +723,9 @@ static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = | |||
418 | * | 723 | * |
419 | ******************************************************************************/ | 724 | ******************************************************************************/ |
420 | 725 | ||
421 | const struct acpi_opcode_info * | 726 | const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode) |
422 | acpi_ps_get_opcode_info ( | ||
423 | u16 opcode) | ||
424 | { | 727 | { |
425 | ACPI_FUNCTION_NAME ("ps_get_opcode_info"); | 728 | ACPI_FUNCTION_NAME("ps_get_opcode_info"); |
426 | |||
427 | 729 | ||
428 | /* | 730 | /* |
429 | * Detect normal 8-bit opcode or extended 16-bit opcode | 731 | * Detect normal 8-bit opcode or extended 16-bit opcode |
@@ -431,25 +733,26 @@ acpi_ps_get_opcode_info ( | |||
431 | if (!(opcode & 0xFF00)) { | 733 | if (!(opcode & 0xFF00)) { |
432 | /* Simple (8-bit) opcode: 0-255, can't index beyond table */ | 734 | /* Simple (8-bit) opcode: 0-255, can't index beyond table */ |
433 | 735 | ||
434 | return (&acpi_gbl_aml_op_info [acpi_gbl_short_op_index [(u8) opcode]]); | 736 | return (&acpi_gbl_aml_op_info |
737 | [acpi_gbl_short_op_index[(u8) opcode]]); | ||
435 | } | 738 | } |
436 | 739 | ||
437 | if (((opcode & 0xFF00) == AML_EXTENDED_OPCODE) && | 740 | if (((opcode & 0xFF00) == AML_EXTENDED_OPCODE) && |
438 | (((u8) opcode) <= MAX_EXTENDED_OPCODE)) { | 741 | (((u8) opcode) <= MAX_EXTENDED_OPCODE)) { |
439 | /* Valid extended (16-bit) opcode */ | 742 | /* Valid extended (16-bit) opcode */ |
440 | 743 | ||
441 | return (&acpi_gbl_aml_op_info [acpi_gbl_long_op_index [(u8) opcode]]); | 744 | return (&acpi_gbl_aml_op_info |
745 | [acpi_gbl_long_op_index[(u8) opcode]]); | ||
442 | } | 746 | } |
443 | 747 | ||
444 | /* Unknown AML opcode */ | 748 | /* Unknown AML opcode */ |
445 | 749 | ||
446 | ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, | 750 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
447 | "Unknown AML opcode [%4.4X]\n", opcode)); | 751 | "Unknown AML opcode [%4.4X]\n", opcode)); |
448 | 752 | ||
449 | return (&acpi_gbl_aml_op_info [_UNK]); | 753 | return (&acpi_gbl_aml_op_info[_UNK]); |
450 | } | 754 | } |
451 | 755 | ||
452 | |||
453 | /******************************************************************************* | 756 | /******************************************************************************* |
454 | * | 757 | * |
455 | * FUNCTION: acpi_ps_get_opcode_name | 758 | * FUNCTION: acpi_ps_get_opcode_name |
@@ -463,16 +766,13 @@ acpi_ps_get_opcode_info ( | |||
463 | * | 766 | * |
464 | ******************************************************************************/ | 767 | ******************************************************************************/ |
465 | 768 | ||
466 | char * | 769 | char *acpi_ps_get_opcode_name(u16 opcode) |
467 | acpi_ps_get_opcode_name ( | ||
468 | u16 opcode) | ||
469 | { | 770 | { |
470 | #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT) | 771 | #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT) |
471 | 772 | ||
472 | const struct acpi_opcode_info *op; | 773 | const struct acpi_opcode_info *op; |
473 | |||
474 | 774 | ||
475 | op = acpi_ps_get_opcode_info (opcode); | 775 | op = acpi_ps_get_opcode_info(opcode); |
476 | 776 | ||
477 | /* Always guaranteed to return a valid pointer */ | 777 | /* Always guaranteed to return a valid pointer */ |
478 | 778 | ||
@@ -483,4 +783,3 @@ acpi_ps_get_opcode_name ( | |||
483 | 783 | ||
484 | #endif | 784 | #endif |
485 | } | 785 | } |
486 | |||
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 16b84a3d0436..3248051d77ee 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c | |||
@@ -41,7 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | /* | 44 | /* |
46 | * Parse the AML and build an operation tree as most interpreters, | 45 | * Parse the AML and build an operation tree as most interpreters, |
47 | * like Perl, do. Parsing is done by hand rather than with a YACC | 46 | * like Perl, do. Parsing is done by hand rather than with a YACC |
@@ -59,8 +58,7 @@ | |||
59 | #include <acpi/acinterp.h> | 58 | #include <acpi/acinterp.h> |
60 | 59 | ||
61 | #define _COMPONENT ACPI_PARSER | 60 | #define _COMPONENT ACPI_PARSER |
62 | ACPI_MODULE_NAME ("psparse") | 61 | ACPI_MODULE_NAME("psparse") |
63 | |||
64 | 62 | ||
65 | /******************************************************************************* | 63 | /******************************************************************************* |
66 | * | 64 | * |
@@ -73,10 +71,7 @@ | |||
73 | * DESCRIPTION: Get the size of the current opcode. | 71 | * DESCRIPTION: Get the size of the current opcode. |
74 | * | 72 | * |
75 | ******************************************************************************/ | 73 | ******************************************************************************/ |
76 | 74 | u32 acpi_ps_get_opcode_size(u32 opcode) | |
77 | u32 | ||
78 | acpi_ps_get_opcode_size ( | ||
79 | u32 opcode) | ||
80 | { | 75 | { |
81 | 76 | ||
82 | /* Extended (2-byte) opcode if > 255 */ | 77 | /* Extended (2-byte) opcode if > 255 */ |
@@ -90,7 +85,6 @@ acpi_ps_get_opcode_size ( | |||
90 | return (1); | 85 | return (1); |
91 | } | 86 | } |
92 | 87 | ||
93 | |||
94 | /******************************************************************************* | 88 | /******************************************************************************* |
95 | * | 89 | * |
96 | * FUNCTION: acpi_ps_peek_opcode | 90 | * FUNCTION: acpi_ps_peek_opcode |
@@ -103,28 +97,24 @@ acpi_ps_get_opcode_size ( | |||
103 | * | 97 | * |
104 | ******************************************************************************/ | 98 | ******************************************************************************/ |
105 | 99 | ||
106 | u16 | 100 | u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state) |
107 | acpi_ps_peek_opcode ( | ||
108 | struct acpi_parse_state *parser_state) | ||
109 | { | 101 | { |
110 | u8 *aml; | 102 | u8 *aml; |
111 | u16 opcode; | 103 | u16 opcode; |
112 | |||
113 | 104 | ||
114 | aml = parser_state->aml; | 105 | aml = parser_state->aml; |
115 | opcode = (u16) ACPI_GET8 (aml); | 106 | opcode = (u16) ACPI_GET8(aml); |
116 | 107 | ||
117 | if (opcode == AML_EXTENDED_OP_PREFIX) { | 108 | if (opcode == AML_EXTENDED_OP_PREFIX) { |
118 | /* Extended opcode, get the second opcode byte */ | 109 | /* Extended opcode, get the second opcode byte */ |
119 | 110 | ||
120 | aml++; | 111 | aml++; |
121 | opcode = (u16) ((opcode << 8) | ACPI_GET8 (aml)); | 112 | opcode = (u16) ((opcode << 8) | ACPI_GET8(aml)); |
122 | } | 113 | } |
123 | 114 | ||
124 | return (opcode); | 115 | return (opcode); |
125 | } | 116 | } |
126 | 117 | ||
127 | |||
128 | /******************************************************************************* | 118 | /******************************************************************************* |
129 | * | 119 | * |
130 | * FUNCTION: acpi_ps_complete_this_op | 120 | * FUNCTION: acpi_ps_complete_this_op |
@@ -139,30 +129,28 @@ acpi_ps_peek_opcode ( | |||
139 | ******************************************************************************/ | 129 | ******************************************************************************/ |
140 | 130 | ||
141 | acpi_status | 131 | acpi_status |
142 | acpi_ps_complete_this_op ( | 132 | acpi_ps_complete_this_op(struct acpi_walk_state * walk_state, |
143 | struct acpi_walk_state *walk_state, | 133 | union acpi_parse_object * op) |
144 | union acpi_parse_object *op) | ||
145 | { | 134 | { |
146 | union acpi_parse_object *prev; | 135 | union acpi_parse_object *prev; |
147 | union acpi_parse_object *next; | 136 | union acpi_parse_object *next; |
148 | const struct acpi_opcode_info *parent_info; | 137 | const struct acpi_opcode_info *parent_info; |
149 | union acpi_parse_object *replacement_op = NULL; | 138 | union acpi_parse_object *replacement_op = NULL; |
150 | |||
151 | |||
152 | ACPI_FUNCTION_TRACE_PTR ("ps_complete_this_op", op); | ||
153 | 139 | ||
140 | ACPI_FUNCTION_TRACE_PTR("ps_complete_this_op", op); | ||
154 | 141 | ||
155 | /* Check for null Op, can happen if AML code is corrupt */ | 142 | /* Check for null Op, can happen if AML code is corrupt */ |
156 | 143 | ||
157 | if (!op) { | 144 | if (!op) { |
158 | return_ACPI_STATUS (AE_OK); /* OK for now */ | 145 | return_ACPI_STATUS(AE_OK); /* OK for now */ |
159 | } | 146 | } |
160 | 147 | ||
161 | /* Delete this op and the subtree below it if asked to */ | 148 | /* Delete this op and the subtree below it if asked to */ |
162 | 149 | ||
163 | if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) != ACPI_PARSE_DELETE_TREE) || | 150 | if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) != |
164 | (walk_state->op_info->class == AML_CLASS_ARGUMENT)) { | 151 | ACPI_PARSE_DELETE_TREE) |
165 | return_ACPI_STATUS (AE_OK); | 152 | || (walk_state->op_info->class == AML_CLASS_ARGUMENT)) { |
153 | return_ACPI_STATUS(AE_OK); | ||
166 | } | 154 | } |
167 | 155 | ||
168 | /* Make sure that we only delete this subtree */ | 156 | /* Make sure that we only delete this subtree */ |
@@ -179,7 +167,9 @@ acpi_ps_complete_this_op ( | |||
179 | * Check if we need to replace the operator and its subtree | 167 | * Check if we need to replace the operator and its subtree |
180 | * with a return value op (placeholder op) | 168 | * with a return value op (placeholder op) |
181 | */ | 169 | */ |
182 | parent_info = acpi_ps_get_opcode_info (op->common.parent->common.aml_opcode); | 170 | parent_info = |
171 | acpi_ps_get_opcode_info(op->common.parent->common. | ||
172 | aml_opcode); | ||
183 | 173 | ||
184 | switch (parent_info->class) { | 174 | switch (parent_info->class) { |
185 | case AML_CLASS_CONTROL: | 175 | case AML_CLASS_CONTROL: |
@@ -191,7 +181,8 @@ acpi_ps_complete_this_op ( | |||
191 | * These opcodes contain term_arg operands. The current | 181 | * These opcodes contain term_arg operands. The current |
192 | * op must be replaced by a placeholder return op | 182 | * op must be replaced by a placeholder return op |
193 | */ | 183 | */ |
194 | replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); | 184 | replacement_op = |
185 | acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP); | ||
195 | if (!replacement_op) { | 186 | if (!replacement_op) { |
196 | goto allocate_error; | 187 | goto allocate_error; |
197 | } | 188 | } |
@@ -203,35 +194,49 @@ acpi_ps_complete_this_op ( | |||
203 | * These opcodes contain term_arg operands. The current | 194 | * These opcodes contain term_arg operands. The current |
204 | * op must be replaced by a placeholder return op | 195 | * op must be replaced by a placeholder return op |
205 | */ | 196 | */ |
206 | if ((op->common.parent->common.aml_opcode == AML_REGION_OP) || | 197 | if ((op->common.parent->common.aml_opcode == |
207 | (op->common.parent->common.aml_opcode == AML_DATA_REGION_OP) || | 198 | AML_REGION_OP) |
208 | (op->common.parent->common.aml_opcode == AML_BUFFER_OP) || | 199 | || (op->common.parent->common.aml_opcode == |
209 | (op->common.parent->common.aml_opcode == AML_PACKAGE_OP) || | 200 | AML_DATA_REGION_OP) |
210 | (op->common.parent->common.aml_opcode == AML_VAR_PACKAGE_OP)) { | 201 | || (op->common.parent->common.aml_opcode == |
211 | replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); | 202 | AML_BUFFER_OP) |
203 | || (op->common.parent->common.aml_opcode == | ||
204 | AML_PACKAGE_OP) | ||
205 | || (op->common.parent->common.aml_opcode == | ||
206 | AML_VAR_PACKAGE_OP)) { | ||
207 | replacement_op = | ||
208 | acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP); | ||
212 | if (!replacement_op) { | 209 | if (!replacement_op) { |
213 | goto allocate_error; | 210 | goto allocate_error; |
214 | } | 211 | } |
215 | } | 212 | } else |
216 | else if ((op->common.parent->common.aml_opcode == AML_NAME_OP) && | 213 | if ((op->common.parent->common.aml_opcode == |
217 | (walk_state->pass_number <= ACPI_IMODE_LOAD_PASS2)) { | 214 | AML_NAME_OP) |
218 | if ((op->common.aml_opcode == AML_BUFFER_OP) || | 215 | && (walk_state->pass_number <= |
219 | (op->common.aml_opcode == AML_PACKAGE_OP) || | 216 | ACPI_IMODE_LOAD_PASS2)) { |
220 | (op->common.aml_opcode == AML_VAR_PACKAGE_OP)) { | 217 | if ((op->common.aml_opcode == AML_BUFFER_OP) |
221 | replacement_op = acpi_ps_alloc_op (op->common.aml_opcode); | 218 | || (op->common.aml_opcode == AML_PACKAGE_OP) |
219 | || (op->common.aml_opcode == | ||
220 | AML_VAR_PACKAGE_OP)) { | ||
221 | replacement_op = | ||
222 | acpi_ps_alloc_op(op->common. | ||
223 | aml_opcode); | ||
222 | if (!replacement_op) { | 224 | if (!replacement_op) { |
223 | goto allocate_error; | 225 | goto allocate_error; |
224 | } | 226 | } |
225 | 227 | ||
226 | replacement_op->named.data = op->named.data; | 228 | replacement_op->named.data = |
227 | replacement_op->named.length = op->named.length; | 229 | op->named.data; |
230 | replacement_op->named.length = | ||
231 | op->named.length; | ||
228 | } | 232 | } |
229 | } | 233 | } |
230 | break; | 234 | break; |
231 | 235 | ||
232 | default: | 236 | default: |
233 | 237 | ||
234 | replacement_op = acpi_ps_alloc_op (AML_INT_RETURN_VALUE_OP); | 238 | replacement_op = |
239 | acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP); | ||
235 | if (!replacement_op) { | 240 | if (!replacement_op) { |
236 | goto allocate_error; | 241 | goto allocate_error; |
237 | } | 242 | } |
@@ -243,59 +248,64 @@ acpi_ps_complete_this_op ( | |||
243 | /* This op is the first in the list */ | 248 | /* This op is the first in the list */ |
244 | 249 | ||
245 | if (replacement_op) { | 250 | if (replacement_op) { |
246 | replacement_op->common.parent = op->common.parent; | 251 | replacement_op->common.parent = |
247 | replacement_op->common.value.arg = NULL; | 252 | op->common.parent; |
248 | replacement_op->common.node = op->common.node; | 253 | replacement_op->common.value.arg = NULL; |
249 | op->common.parent->common.value.arg = replacement_op; | 254 | replacement_op->common.node = op->common.node; |
250 | replacement_op->common.next = op->common.next; | 255 | op->common.parent->common.value.arg = |
251 | } | 256 | replacement_op; |
252 | else { | 257 | replacement_op->common.next = op->common.next; |
253 | op->common.parent->common.value.arg = op->common.next; | 258 | } else { |
259 | op->common.parent->common.value.arg = | ||
260 | op->common.next; | ||
254 | } | 261 | } |
255 | } | 262 | } |
256 | 263 | ||
257 | /* Search the parent list */ | 264 | /* Search the parent list */ |
258 | 265 | ||
259 | else while (prev) { | 266 | else |
260 | /* Traverse all siblings in the parent's argument list */ | 267 | while (prev) { |
261 | 268 | /* Traverse all siblings in the parent's argument list */ | |
262 | next = prev->common.next; | 269 | |
263 | if (next == op) { | 270 | next = prev->common.next; |
264 | if (replacement_op) { | 271 | if (next == op) { |
265 | replacement_op->common.parent = op->common.parent; | 272 | if (replacement_op) { |
266 | replacement_op->common.value.arg = NULL; | 273 | replacement_op->common.parent = |
267 | replacement_op->common.node = op->common.node; | 274 | op->common.parent; |
268 | prev->common.next = replacement_op; | 275 | replacement_op->common.value. |
269 | replacement_op->common.next = op->common.next; | 276 | arg = NULL; |
270 | next = NULL; | 277 | replacement_op->common.node = |
271 | } | 278 | op->common.node; |
272 | else { | 279 | prev->common.next = |
273 | prev->common.next = op->common.next; | 280 | replacement_op; |
274 | next = NULL; | 281 | replacement_op->common.next = |
282 | op->common.next; | ||
283 | next = NULL; | ||
284 | } else { | ||
285 | prev->common.next = | ||
286 | op->common.next; | ||
287 | next = NULL; | ||
288 | } | ||
275 | } | 289 | } |
290 | prev = next; | ||
276 | } | 291 | } |
277 | prev = next; | ||
278 | } | ||
279 | } | 292 | } |
280 | 293 | ||
281 | 294 | cleanup: | |
282 | cleanup: | ||
283 | 295 | ||
284 | /* Now we can actually delete the subtree rooted at Op */ | 296 | /* Now we can actually delete the subtree rooted at Op */ |
285 | 297 | ||
286 | acpi_ps_delete_parse_tree (op); | 298 | acpi_ps_delete_parse_tree(op); |
287 | return_ACPI_STATUS (AE_OK); | 299 | return_ACPI_STATUS(AE_OK); |
288 | 300 | ||
289 | 301 | allocate_error: | |
290 | allocate_error: | ||
291 | 302 | ||
292 | /* Always delete the subtree, even on error */ | 303 | /* Always delete the subtree, even on error */ |
293 | 304 | ||
294 | acpi_ps_delete_parse_tree (op); | 305 | acpi_ps_delete_parse_tree(op); |
295 | return_ACPI_STATUS (AE_NO_MEMORY); | 306 | return_ACPI_STATUS(AE_NO_MEMORY); |
296 | } | 307 | } |
297 | 308 | ||
298 | |||
299 | /******************************************************************************* | 309 | /******************************************************************************* |
300 | * | 310 | * |
301 | * FUNCTION: acpi_ps_next_parse_state | 311 | * FUNCTION: acpi_ps_next_parse_state |
@@ -312,17 +322,14 @@ allocate_error: | |||
312 | ******************************************************************************/ | 322 | ******************************************************************************/ |
313 | 323 | ||
314 | acpi_status | 324 | acpi_status |
315 | acpi_ps_next_parse_state ( | 325 | acpi_ps_next_parse_state(struct acpi_walk_state *walk_state, |
316 | struct acpi_walk_state *walk_state, | 326 | union acpi_parse_object *op, |
317 | union acpi_parse_object *op, | 327 | acpi_status callback_status) |
318 | acpi_status callback_status) | ||
319 | { | 328 | { |
320 | struct acpi_parse_state *parser_state = &walk_state->parser_state; | 329 | struct acpi_parse_state *parser_state = &walk_state->parser_state; |
321 | acpi_status status = AE_CTRL_PENDING; | 330 | acpi_status status = AE_CTRL_PENDING; |
322 | |||
323 | |||
324 | ACPI_FUNCTION_TRACE_PTR ("ps_next_parse_state", op); | ||
325 | 331 | ||
332 | ACPI_FUNCTION_TRACE_PTR("ps_next_parse_state", op); | ||
326 | 333 | ||
327 | switch (callback_status) { | 334 | switch (callback_status) { |
328 | case AE_CTRL_TERMINATE: | 335 | case AE_CTRL_TERMINATE: |
@@ -335,7 +342,6 @@ acpi_ps_next_parse_state ( | |||
335 | status = AE_CTRL_TERMINATE; | 342 | status = AE_CTRL_TERMINATE; |
336 | break; | 343 | break; |
337 | 344 | ||
338 | |||
339 | case AE_CTRL_BREAK: | 345 | case AE_CTRL_BREAK: |
340 | 346 | ||
341 | parser_state->aml = walk_state->aml_last_while; | 347 | parser_state->aml = walk_state->aml_last_while; |
@@ -345,7 +351,6 @@ acpi_ps_next_parse_state ( | |||
345 | 351 | ||
346 | case AE_CTRL_CONTINUE: | 352 | case AE_CTRL_CONTINUE: |
347 | 353 | ||
348 | |||
349 | parser_state->aml = walk_state->aml_last_while; | 354 | parser_state->aml = walk_state->aml_last_while; |
350 | status = AE_CTRL_CONTINUE; | 355 | status = AE_CTRL_CONTINUE; |
351 | break; | 356 | break; |
@@ -369,10 +374,9 @@ acpi_ps_next_parse_state ( | |||
369 | * Predicate of an IF was true, and we are at the matching ELSE. | 374 | * Predicate of an IF was true, and we are at the matching ELSE. |
370 | * Just close out this package | 375 | * Just close out this package |
371 | */ | 376 | */ |
372 | parser_state->aml = acpi_ps_get_next_package_end (parser_state); | 377 | parser_state->aml = acpi_ps_get_next_package_end(parser_state); |
373 | break; | 378 | break; |
374 | 379 | ||
375 | |||
376 | case AE_CTRL_FALSE: | 380 | case AE_CTRL_FALSE: |
377 | 381 | ||
378 | /* | 382 | /* |
@@ -390,7 +394,6 @@ acpi_ps_next_parse_state ( | |||
390 | status = AE_CTRL_END; | 394 | status = AE_CTRL_END; |
391 | break; | 395 | break; |
392 | 396 | ||
393 | |||
394 | case AE_CTRL_TRANSFER: | 397 | case AE_CTRL_TRANSFER: |
395 | 398 | ||
396 | /* A method call (invocation) -- transfer control */ | 399 | /* A method call (invocation) -- transfer control */ |
@@ -398,14 +401,15 @@ acpi_ps_next_parse_state ( | |||
398 | status = AE_CTRL_TRANSFER; | 401 | status = AE_CTRL_TRANSFER; |
399 | walk_state->prev_op = op; | 402 | walk_state->prev_op = op; |
400 | walk_state->method_call_op = op; | 403 | walk_state->method_call_op = op; |
401 | walk_state->method_call_node = (op->common.value.arg)->common.node; | 404 | walk_state->method_call_node = |
405 | (op->common.value.arg)->common.node; | ||
402 | 406 | ||
403 | /* Will return value (if any) be used by the caller? */ | 407 | /* Will return value (if any) be used by the caller? */ |
404 | 408 | ||
405 | walk_state->return_used = acpi_ds_is_result_used (op, walk_state); | 409 | walk_state->return_used = |
410 | acpi_ds_is_result_used(op, walk_state); | ||
406 | break; | 411 | break; |
407 | 412 | ||
408 | |||
409 | default: | 413 | default: |
410 | 414 | ||
411 | status = callback_status; | 415 | status = callback_status; |
@@ -415,10 +419,9 @@ acpi_ps_next_parse_state ( | |||
415 | break; | 419 | break; |
416 | } | 420 | } |
417 | 421 | ||
418 | return_ACPI_STATUS (status); | 422 | return_ACPI_STATUS(status); |
419 | } | 423 | } |
420 | 424 | ||
421 | |||
422 | /******************************************************************************* | 425 | /******************************************************************************* |
423 | * | 426 | * |
424 | * FUNCTION: acpi_ps_parse_aml | 427 | * FUNCTION: acpi_ps_parse_aml |
@@ -432,34 +435,30 @@ acpi_ps_next_parse_state ( | |||
432 | * | 435 | * |
433 | ******************************************************************************/ | 436 | ******************************************************************************/ |
434 | 437 | ||
435 | acpi_status | 438 | acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) |
436 | acpi_ps_parse_aml ( | ||
437 | struct acpi_walk_state *walk_state) | ||
438 | { | 439 | { |
439 | acpi_status status; | 440 | acpi_status status; |
440 | acpi_status terminate_status; | 441 | acpi_status terminate_status; |
441 | struct acpi_thread_state *thread; | 442 | struct acpi_thread_state *thread; |
442 | struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list; | 443 | struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list; |
443 | struct acpi_walk_state *previous_walk_state; | 444 | struct acpi_walk_state *previous_walk_state; |
444 | |||
445 | |||
446 | ACPI_FUNCTION_TRACE ("ps_parse_aml"); | ||
447 | 445 | ||
448 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 446 | ACPI_FUNCTION_TRACE("ps_parse_aml"); |
449 | "Entered with walk_state=%p Aml=%p size=%X\n", | ||
450 | walk_state, walk_state->parser_state.aml, | ||
451 | walk_state->parser_state.aml_size)); | ||
452 | 447 | ||
448 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, | ||
449 | "Entered with walk_state=%p Aml=%p size=%X\n", | ||
450 | walk_state, walk_state->parser_state.aml, | ||
451 | walk_state->parser_state.aml_size)); | ||
453 | 452 | ||
454 | /* Create and initialize a new thread state */ | 453 | /* Create and initialize a new thread state */ |
455 | 454 | ||
456 | thread = acpi_ut_create_thread_state (); | 455 | thread = acpi_ut_create_thread_state(); |
457 | if (!thread) { | 456 | if (!thread) { |
458 | return_ACPI_STATUS (AE_NO_MEMORY); | 457 | return_ACPI_STATUS(AE_NO_MEMORY); |
459 | } | 458 | } |
460 | 459 | ||
461 | walk_state->thread = thread; | 460 | walk_state->thread = thread; |
462 | acpi_ds_push_walk_state (walk_state, thread); | 461 | acpi_ds_push_walk_state(walk_state, thread); |
463 | 462 | ||
464 | /* | 463 | /* |
465 | * This global allows the AML debugger to get a handle to the currently | 464 | * This global allows the AML debugger to get a handle to the currently |
@@ -471,54 +470,56 @@ acpi_ps_parse_aml ( | |||
471 | * Execute the walk loop as long as there is a valid Walk State. This | 470 | * Execute the walk loop as long as there is a valid Walk State. This |
472 | * handles nested control method invocations without recursion. | 471 | * handles nested control method invocations without recursion. |
473 | */ | 472 | */ |
474 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "State=%p\n", walk_state)); | 473 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "State=%p\n", walk_state)); |
475 | 474 | ||
476 | status = AE_OK; | 475 | status = AE_OK; |
477 | while (walk_state) { | 476 | while (walk_state) { |
478 | if (ACPI_SUCCESS (status)) { | 477 | if (ACPI_SUCCESS(status)) { |
479 | /* | 478 | /* |
480 | * The parse_loop executes AML until the method terminates | 479 | * The parse_loop executes AML until the method terminates |
481 | * or calls another method. | 480 | * or calls another method. |
482 | */ | 481 | */ |
483 | status = acpi_ps_parse_loop (walk_state); | 482 | status = acpi_ps_parse_loop(walk_state); |
484 | } | 483 | } |
485 | 484 | ||
486 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 485 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
487 | "Completed one call to walk loop, %s State=%p\n", | 486 | "Completed one call to walk loop, %s State=%p\n", |
488 | acpi_format_exception (status), walk_state)); | 487 | acpi_format_exception(status), walk_state)); |
489 | 488 | ||
490 | if (status == AE_CTRL_TRANSFER) { | 489 | if (status == AE_CTRL_TRANSFER) { |
491 | /* | 490 | /* |
492 | * A method call was detected. | 491 | * A method call was detected. |
493 | * Transfer control to the called control method | 492 | * Transfer control to the called control method |
494 | */ | 493 | */ |
495 | status = acpi_ds_call_control_method (thread, walk_state, NULL); | 494 | status = |
495 | acpi_ds_call_control_method(thread, walk_state, | ||
496 | NULL); | ||
496 | 497 | ||
497 | /* | 498 | /* |
498 | * If the transfer to the new method method call worked, a new walk | 499 | * If the transfer to the new method method call worked, a new walk |
499 | * state was created -- get it | 500 | * state was created -- get it |
500 | */ | 501 | */ |
501 | walk_state = acpi_ds_get_current_walk_state (thread); | 502 | walk_state = acpi_ds_get_current_walk_state(thread); |
502 | continue; | 503 | continue; |
503 | } | 504 | } else if (status == AE_CTRL_TERMINATE) { |
504 | else if (status == AE_CTRL_TERMINATE) { | ||
505 | status = AE_OK; | 505 | status = AE_OK; |
506 | } | 506 | } else if ((status != AE_OK) && (walk_state->method_desc)) { |
507 | else if ((status != AE_OK) && (walk_state->method_desc)) { | 507 | ACPI_REPORT_METHOD_ERROR("Method execution failed", |
508 | ACPI_REPORT_METHOD_ERROR ("Method execution failed", | 508 | walk_state->method_node, NULL, |
509 | walk_state->method_node, NULL, status); | 509 | status); |
510 | 510 | ||
511 | /* Check for possible multi-thread reentrancy problem */ | 511 | /* Check for possible multi-thread reentrancy problem */ |
512 | 512 | ||
513 | if ((status == AE_ALREADY_EXISTS) && | 513 | if ((status == AE_ALREADY_EXISTS) && |
514 | (!walk_state->method_desc->method.semaphore)) { | 514 | (!walk_state->method_desc->method.semaphore)) { |
515 | /* | 515 | /* |
516 | * This method is marked not_serialized, but it tried to create | 516 | * This method is marked not_serialized, but it tried to create |
517 | * a named object, causing the second thread entrance to fail. | 517 | * a named object, causing the second thread entrance to fail. |
518 | * We will workaround this by marking the method permanently | 518 | * We will workaround this by marking the method permanently |
519 | * as Serialized. | 519 | * as Serialized. |
520 | */ | 520 | */ |
521 | walk_state->method_desc->method.method_flags |= AML_METHOD_SERIALIZED; | 521 | walk_state->method_desc->method.method_flags |= |
522 | AML_METHOD_SERIALIZED; | ||
522 | walk_state->method_desc->method.concurrency = 1; | 523 | walk_state->method_desc->method.concurrency = 1; |
523 | } | 524 | } |
524 | } | 525 | } |
@@ -533,21 +534,22 @@ acpi_ps_parse_aml ( | |||
533 | 534 | ||
534 | /* We are done with this walk, move on to the parent if any */ | 535 | /* We are done with this walk, move on to the parent if any */ |
535 | 536 | ||
536 | walk_state = acpi_ds_pop_walk_state (thread); | 537 | walk_state = acpi_ds_pop_walk_state(thread); |
537 | 538 | ||
538 | /* Reset the current scope to the beginning of scope stack */ | 539 | /* Reset the current scope to the beginning of scope stack */ |
539 | 540 | ||
540 | acpi_ds_scope_stack_clear (walk_state); | 541 | acpi_ds_scope_stack_clear(walk_state); |
541 | 542 | ||
542 | /* | 543 | /* |
543 | * If we just returned from the execution of a control method, | 544 | * If we just returned from the execution of a control method, |
544 | * there's lots of cleanup to do | 545 | * there's lots of cleanup to do |
545 | */ | 546 | */ |
546 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == ACPI_PARSE_EXECUTE) { | 547 | if ((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) == |
547 | terminate_status = acpi_ds_terminate_control_method (walk_state); | 548 | ACPI_PARSE_EXECUTE) { |
548 | if (ACPI_FAILURE (terminate_status)) { | 549 | terminate_status = |
549 | ACPI_REPORT_ERROR (( | 550 | acpi_ds_terminate_control_method(walk_state); |
550 | "Could not terminate control method properly\n")); | 551 | if (ACPI_FAILURE(terminate_status)) { |
552 | ACPI_REPORT_ERROR(("Could not terminate control method properly\n")); | ||
551 | 553 | ||
552 | /* Ignore error and continue */ | 554 | /* Ignore error and continue */ |
553 | } | 555 | } |
@@ -555,46 +557,53 @@ acpi_ps_parse_aml ( | |||
555 | 557 | ||
556 | /* Delete this walk state and all linked control states */ | 558 | /* Delete this walk state and all linked control states */ |
557 | 559 | ||
558 | acpi_ps_cleanup_scope (&walk_state->parser_state); | 560 | acpi_ps_cleanup_scope(&walk_state->parser_state); |
559 | 561 | ||
560 | previous_walk_state = walk_state; | 562 | previous_walk_state = walk_state; |
561 | 563 | ||
562 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 564 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
563 | "return_value=%p, implicit_value=%p State=%p\n", | 565 | "return_value=%p, implicit_value=%p State=%p\n", |
564 | walk_state->return_desc, walk_state->implicit_return_obj, walk_state)); | 566 | walk_state->return_desc, |
567 | walk_state->implicit_return_obj, walk_state)); | ||
565 | 568 | ||
566 | /* Check if we have restarted a preempted walk */ | 569 | /* Check if we have restarted a preempted walk */ |
567 | 570 | ||
568 | walk_state = acpi_ds_get_current_walk_state (thread); | 571 | walk_state = acpi_ds_get_current_walk_state(thread); |
569 | if (walk_state) { | 572 | if (walk_state) { |
570 | if (ACPI_SUCCESS (status)) { | 573 | if (ACPI_SUCCESS(status)) { |
571 | /* | 574 | /* |
572 | * There is another walk state, restart it. | 575 | * There is another walk state, restart it. |
573 | * If the method return value is not used by the parent, | 576 | * If the method return value is not used by the parent, |
574 | * The object is deleted | 577 | * The object is deleted |
575 | */ | 578 | */ |
576 | if (!previous_walk_state->return_desc) { | 579 | if (!previous_walk_state->return_desc) { |
577 | status = acpi_ds_restart_control_method (walk_state, | 580 | status = |
578 | previous_walk_state->implicit_return_obj); | 581 | acpi_ds_restart_control_method |
579 | } | 582 | (walk_state, |
580 | else { | 583 | previous_walk_state-> |
584 | implicit_return_obj); | ||
585 | } else { | ||
581 | /* | 586 | /* |
582 | * We have a valid return value, delete any implicit | 587 | * We have a valid return value, delete any implicit |
583 | * return value. | 588 | * return value. |
584 | */ | 589 | */ |
585 | acpi_ds_clear_implicit_return (previous_walk_state); | 590 | acpi_ds_clear_implicit_return |
591 | (previous_walk_state); | ||
586 | 592 | ||
587 | status = acpi_ds_restart_control_method (walk_state, | 593 | status = |
588 | previous_walk_state->return_desc); | 594 | acpi_ds_restart_control_method |
595 | (walk_state, | ||
596 | previous_walk_state->return_desc); | ||
589 | } | 597 | } |
590 | if (ACPI_SUCCESS (status)) { | 598 | if (ACPI_SUCCESS(status)) { |
591 | walk_state->walk_type |= ACPI_WALK_METHOD_RESTART; | 599 | walk_state->walk_type |= |
600 | ACPI_WALK_METHOD_RESTART; | ||
592 | } | 601 | } |
593 | } | 602 | } else { |
594 | else { | ||
595 | /* On error, delete any return object */ | 603 | /* On error, delete any return object */ |
596 | 604 | ||
597 | acpi_ut_remove_reference (previous_walk_state->return_desc); | 605 | acpi_ut_remove_reference(previous_walk_state-> |
606 | return_desc); | ||
598 | } | 607 | } |
599 | } | 608 | } |
600 | 609 | ||
@@ -605,37 +614,36 @@ acpi_ps_parse_aml ( | |||
605 | else if (previous_walk_state->caller_return_desc) { | 614 | else if (previous_walk_state->caller_return_desc) { |
606 | if (previous_walk_state->implicit_return_obj) { | 615 | if (previous_walk_state->implicit_return_obj) { |
607 | *(previous_walk_state->caller_return_desc) = | 616 | *(previous_walk_state->caller_return_desc) = |
608 | previous_walk_state->implicit_return_obj; | 617 | previous_walk_state->implicit_return_obj; |
609 | } | 618 | } else { |
610 | else { | 619 | /* NULL if no return value */ |
611 | /* NULL if no return value */ | ||
612 | 620 | ||
613 | *(previous_walk_state->caller_return_desc) = | 621 | *(previous_walk_state->caller_return_desc) = |
614 | previous_walk_state->return_desc; | 622 | previous_walk_state->return_desc; |
615 | } | 623 | } |
616 | } | 624 | } else { |
617 | else { | ||
618 | if (previous_walk_state->return_desc) { | 625 | if (previous_walk_state->return_desc) { |
619 | /* Caller doesn't want it, must delete it */ | 626 | /* Caller doesn't want it, must delete it */ |
620 | 627 | ||
621 | acpi_ut_remove_reference (previous_walk_state->return_desc); | 628 | acpi_ut_remove_reference(previous_walk_state-> |
629 | return_desc); | ||
622 | } | 630 | } |
623 | if (previous_walk_state->implicit_return_obj) { | 631 | if (previous_walk_state->implicit_return_obj) { |
624 | /* Caller doesn't want it, must delete it */ | 632 | /* Caller doesn't want it, must delete it */ |
625 | 633 | ||
626 | acpi_ut_remove_reference (previous_walk_state->implicit_return_obj); | 634 | acpi_ut_remove_reference(previous_walk_state-> |
635 | implicit_return_obj); | ||
627 | } | 636 | } |
628 | } | 637 | } |
629 | 638 | ||
630 | acpi_ds_delete_walk_state (previous_walk_state); | 639 | acpi_ds_delete_walk_state(previous_walk_state); |
631 | } | 640 | } |
632 | 641 | ||
633 | /* Normal exit */ | 642 | /* Normal exit */ |
634 | 643 | ||
635 | acpi_ex_release_all_mutexes (thread); | 644 | acpi_ex_release_all_mutexes(thread); |
636 | acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread)); | 645 | acpi_ut_delete_generic_state(ACPI_CAST_PTR |
646 | (union acpi_generic_state, thread)); | ||
637 | acpi_gbl_current_walk_list = prev_walk_list; | 647 | acpi_gbl_current_walk_list = prev_walk_list; |
638 | return_ACPI_STATUS (status); | 648 | return_ACPI_STATUS(status); |
639 | } | 649 | } |
640 | |||
641 | |||
diff --git a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c index 8dcd1b1e7131..1c953b6f1af1 100644 --- a/drivers/acpi/parser/psscope.c +++ b/drivers/acpi/parser/psscope.c | |||
@@ -41,13 +41,11 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | 46 | ||
48 | #define _COMPONENT ACPI_PARSER | 47 | #define _COMPONENT ACPI_PARSER |
49 | ACPI_MODULE_NAME ("psscope") | 48 | ACPI_MODULE_NAME("psscope") |
50 | |||
51 | 49 | ||
52 | /******************************************************************************* | 50 | /******************************************************************************* |
53 | * | 51 | * |
@@ -60,16 +58,13 @@ | |||
60 | * DESCRIPTION: Get parent of current op being parsed | 58 | * DESCRIPTION: Get parent of current op being parsed |
61 | * | 59 | * |
62 | ******************************************************************************/ | 60 | ******************************************************************************/ |
63 | 61 | union acpi_parse_object *acpi_ps_get_parent_scope(struct acpi_parse_state | |
64 | union acpi_parse_object * | 62 | *parser_state) |
65 | acpi_ps_get_parent_scope ( | ||
66 | struct acpi_parse_state *parser_state) | ||
67 | { | 63 | { |
68 | 64 | ||
69 | return (parser_state->scope->parse_scope.op); | 65 | return (parser_state->scope->parse_scope.op); |
70 | } | 66 | } |
71 | 67 | ||
72 | |||
73 | /******************************************************************************* | 68 | /******************************************************************************* |
74 | * | 69 | * |
75 | * FUNCTION: acpi_ps_has_completed_scope | 70 | * FUNCTION: acpi_ps_has_completed_scope |
@@ -84,17 +79,14 @@ acpi_ps_get_parent_scope ( | |||
84 | * | 79 | * |
85 | ******************************************************************************/ | 80 | ******************************************************************************/ |
86 | 81 | ||
87 | u8 | 82 | u8 acpi_ps_has_completed_scope(struct acpi_parse_state * parser_state) |
88 | acpi_ps_has_completed_scope ( | ||
89 | struct acpi_parse_state *parser_state) | ||
90 | { | 83 | { |
91 | 84 | ||
92 | return ((u8) | 85 | return ((u8) |
93 | ((parser_state->aml >= parser_state->scope->parse_scope.arg_end || | 86 | ((parser_state->aml >= parser_state->scope->parse_scope.arg_end |
94 | !parser_state->scope->parse_scope.arg_count))); | 87 | || !parser_state->scope->parse_scope.arg_count))); |
95 | } | 88 | } |
96 | 89 | ||
97 | |||
98 | /******************************************************************************* | 90 | /******************************************************************************* |
99 | * | 91 | * |
100 | * FUNCTION: acpi_ps_init_scope | 92 | * FUNCTION: acpi_ps_init_scope |
@@ -109,34 +101,30 @@ acpi_ps_has_completed_scope ( | |||
109 | ******************************************************************************/ | 101 | ******************************************************************************/ |
110 | 102 | ||
111 | acpi_status | 103 | acpi_status |
112 | acpi_ps_init_scope ( | 104 | acpi_ps_init_scope(struct acpi_parse_state * parser_state, |
113 | struct acpi_parse_state *parser_state, | 105 | union acpi_parse_object * root_op) |
114 | union acpi_parse_object *root_op) | ||
115 | { | 106 | { |
116 | union acpi_generic_state *scope; | 107 | union acpi_generic_state *scope; |
117 | 108 | ||
109 | ACPI_FUNCTION_TRACE_PTR("ps_init_scope", root_op); | ||
118 | 110 | ||
119 | ACPI_FUNCTION_TRACE_PTR ("ps_init_scope", root_op); | 111 | scope = acpi_ut_create_generic_state(); |
120 | |||
121 | |||
122 | scope = acpi_ut_create_generic_state (); | ||
123 | if (!scope) { | 112 | if (!scope) { |
124 | return_ACPI_STATUS (AE_NO_MEMORY); | 113 | return_ACPI_STATUS(AE_NO_MEMORY); |
125 | } | 114 | } |
126 | 115 | ||
127 | scope->common.data_type = ACPI_DESC_TYPE_STATE_RPSCOPE; | 116 | scope->common.data_type = ACPI_DESC_TYPE_STATE_RPSCOPE; |
128 | scope->parse_scope.op = root_op; | 117 | scope->parse_scope.op = root_op; |
129 | scope->parse_scope.arg_count = ACPI_VAR_ARGS; | 118 | scope->parse_scope.arg_count = ACPI_VAR_ARGS; |
130 | scope->parse_scope.arg_end = parser_state->aml_end; | 119 | scope->parse_scope.arg_end = parser_state->aml_end; |
131 | scope->parse_scope.pkg_end = parser_state->aml_end; | 120 | scope->parse_scope.pkg_end = parser_state->aml_end; |
132 | 121 | ||
133 | parser_state->scope = scope; | 122 | parser_state->scope = scope; |
134 | parser_state->start_op = root_op; | 123 | parser_state->start_op = root_op; |
135 | 124 | ||
136 | return_ACPI_STATUS (AE_OK); | 125 | return_ACPI_STATUS(AE_OK); |
137 | } | 126 | } |
138 | 127 | ||
139 | |||
140 | /******************************************************************************* | 128 | /******************************************************************************* |
141 | * | 129 | * |
142 | * FUNCTION: acpi_ps_push_scope | 130 | * FUNCTION: acpi_ps_push_scope |
@@ -153,48 +141,42 @@ acpi_ps_init_scope ( | |||
153 | ******************************************************************************/ | 141 | ******************************************************************************/ |
154 | 142 | ||
155 | acpi_status | 143 | acpi_status |
156 | acpi_ps_push_scope ( | 144 | acpi_ps_push_scope(struct acpi_parse_state *parser_state, |
157 | struct acpi_parse_state *parser_state, | 145 | union acpi_parse_object *op, |
158 | union acpi_parse_object *op, | 146 | u32 remaining_args, u32 arg_count) |
159 | u32 remaining_args, | ||
160 | u32 arg_count) | ||
161 | { | 147 | { |
162 | union acpi_generic_state *scope; | 148 | union acpi_generic_state *scope; |
163 | |||
164 | |||
165 | ACPI_FUNCTION_TRACE_PTR ("ps_push_scope", op); | ||
166 | 149 | ||
150 | ACPI_FUNCTION_TRACE_PTR("ps_push_scope", op); | ||
167 | 151 | ||
168 | scope = acpi_ut_create_generic_state (); | 152 | scope = acpi_ut_create_generic_state(); |
169 | if (!scope) { | 153 | if (!scope) { |
170 | return_ACPI_STATUS (AE_NO_MEMORY); | 154 | return_ACPI_STATUS(AE_NO_MEMORY); |
171 | } | 155 | } |
172 | 156 | ||
173 | scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE; | 157 | scope->common.data_type = ACPI_DESC_TYPE_STATE_PSCOPE; |
174 | scope->parse_scope.op = op; | 158 | scope->parse_scope.op = op; |
175 | scope->parse_scope.arg_list = remaining_args; | 159 | scope->parse_scope.arg_list = remaining_args; |
176 | scope->parse_scope.arg_count = arg_count; | 160 | scope->parse_scope.arg_count = arg_count; |
177 | scope->parse_scope.pkg_end = parser_state->pkg_end; | 161 | scope->parse_scope.pkg_end = parser_state->pkg_end; |
178 | 162 | ||
179 | /* Push onto scope stack */ | 163 | /* Push onto scope stack */ |
180 | 164 | ||
181 | acpi_ut_push_generic_state (&parser_state->scope, scope); | 165 | acpi_ut_push_generic_state(&parser_state->scope, scope); |
182 | 166 | ||
183 | if (arg_count == ACPI_VAR_ARGS) { | 167 | if (arg_count == ACPI_VAR_ARGS) { |
184 | /* Multiple arguments */ | 168 | /* Multiple arguments */ |
185 | 169 | ||
186 | scope->parse_scope.arg_end = parser_state->pkg_end; | 170 | scope->parse_scope.arg_end = parser_state->pkg_end; |
187 | } | 171 | } else { |
188 | else { | ||
189 | /* Single argument */ | 172 | /* Single argument */ |
190 | 173 | ||
191 | scope->parse_scope.arg_end = ACPI_TO_POINTER (ACPI_MAX_PTR); | 174 | scope->parse_scope.arg_end = ACPI_TO_POINTER(ACPI_MAX_PTR); |
192 | } | 175 | } |
193 | 176 | ||
194 | return_ACPI_STATUS (AE_OK); | 177 | return_ACPI_STATUS(AE_OK); |
195 | } | 178 | } |
196 | 179 | ||
197 | |||
198 | /******************************************************************************* | 180 | /******************************************************************************* |
199 | * | 181 | * |
200 | * FUNCTION: acpi_ps_pop_scope | 182 | * FUNCTION: acpi_ps_pop_scope |
@@ -212,48 +194,41 @@ acpi_ps_push_scope ( | |||
212 | ******************************************************************************/ | 194 | ******************************************************************************/ |
213 | 195 | ||
214 | void | 196 | void |
215 | acpi_ps_pop_scope ( | 197 | acpi_ps_pop_scope(struct acpi_parse_state *parser_state, |
216 | struct acpi_parse_state *parser_state, | 198 | union acpi_parse_object **op, u32 * arg_list, u32 * arg_count) |
217 | union acpi_parse_object **op, | ||
218 | u32 *arg_list, | ||
219 | u32 *arg_count) | ||
220 | { | 199 | { |
221 | union acpi_generic_state *scope = parser_state->scope; | 200 | union acpi_generic_state *scope = parser_state->scope; |
222 | |||
223 | |||
224 | ACPI_FUNCTION_TRACE ("ps_pop_scope"); | ||
225 | 201 | ||
202 | ACPI_FUNCTION_TRACE("ps_pop_scope"); | ||
226 | 203 | ||
227 | /* Only pop the scope if there is in fact a next scope */ | 204 | /* Only pop the scope if there is in fact a next scope */ |
228 | 205 | ||
229 | if (scope->common.next) { | 206 | if (scope->common.next) { |
230 | scope = acpi_ut_pop_generic_state (&parser_state->scope); | 207 | scope = acpi_ut_pop_generic_state(&parser_state->scope); |
231 | 208 | ||
232 | /* return to parsing previous op */ | 209 | /* return to parsing previous op */ |
233 | 210 | ||
234 | *op = scope->parse_scope.op; | 211 | *op = scope->parse_scope.op; |
235 | *arg_list = scope->parse_scope.arg_list; | 212 | *arg_list = scope->parse_scope.arg_list; |
236 | *arg_count = scope->parse_scope.arg_count; | 213 | *arg_count = scope->parse_scope.arg_count; |
237 | parser_state->pkg_end = scope->parse_scope.pkg_end; | 214 | parser_state->pkg_end = scope->parse_scope.pkg_end; |
238 | 215 | ||
239 | /* All done with this scope state structure */ | 216 | /* All done with this scope state structure */ |
240 | 217 | ||
241 | acpi_ut_delete_generic_state (scope); | 218 | acpi_ut_delete_generic_state(scope); |
242 | } | 219 | } else { |
243 | else { | ||
244 | /* empty parse stack, prepare to fetch next opcode */ | 220 | /* empty parse stack, prepare to fetch next opcode */ |
245 | 221 | ||
246 | *op = NULL; | 222 | *op = NULL; |
247 | *arg_list = 0; | 223 | *arg_list = 0; |
248 | *arg_count = 0; | 224 | *arg_count = 0; |
249 | } | 225 | } |
250 | 226 | ||
251 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 227 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
252 | "Popped Op %p Args %X\n", *op, *arg_count)); | 228 | "Popped Op %p Args %X\n", *op, *arg_count)); |
253 | return_VOID; | 229 | return_VOID; |
254 | } | 230 | } |
255 | 231 | ||
256 | |||
257 | /******************************************************************************* | 232 | /******************************************************************************* |
258 | * | 233 | * |
259 | * FUNCTION: acpi_ps_cleanup_scope | 234 | * FUNCTION: acpi_ps_cleanup_scope |
@@ -267,15 +242,11 @@ acpi_ps_pop_scope ( | |||
267 | * | 242 | * |
268 | ******************************************************************************/ | 243 | ******************************************************************************/ |
269 | 244 | ||
270 | void | 245 | void acpi_ps_cleanup_scope(struct acpi_parse_state *parser_state) |
271 | acpi_ps_cleanup_scope ( | ||
272 | struct acpi_parse_state *parser_state) | ||
273 | { | 246 | { |
274 | union acpi_generic_state *scope; | 247 | union acpi_generic_state *scope; |
275 | |||
276 | |||
277 | ACPI_FUNCTION_TRACE_PTR ("ps_cleanup_scope", parser_state); | ||
278 | 248 | ||
249 | ACPI_FUNCTION_TRACE_PTR("ps_cleanup_scope", parser_state); | ||
279 | 250 | ||
280 | if (!parser_state) { | 251 | if (!parser_state) { |
281 | return_VOID; | 252 | return_VOID; |
@@ -284,10 +255,9 @@ acpi_ps_cleanup_scope ( | |||
284 | /* Delete anything on the scope stack */ | 255 | /* Delete anything on the scope stack */ |
285 | 256 | ||
286 | while (parser_state->scope) { | 257 | while (parser_state->scope) { |
287 | scope = acpi_ut_pop_generic_state (&parser_state->scope); | 258 | scope = acpi_ut_pop_generic_state(&parser_state->scope); |
288 | acpi_ut_delete_generic_state (scope); | 259 | acpi_ut_delete_generic_state(scope); |
289 | } | 260 | } |
290 | 261 | ||
291 | return_VOID; | 262 | return_VOID; |
292 | } | 263 | } |
293 | |||
diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c index d5aafe73fca0..f0e755884eea 100644 --- a/drivers/acpi/parser/pstree.c +++ b/drivers/acpi/parser/pstree.c | |||
@@ -41,23 +41,18 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
48 | 47 | ||
49 | #define _COMPONENT ACPI_PARSER | 48 | #define _COMPONENT ACPI_PARSER |
50 | ACPI_MODULE_NAME ("pstree") | 49 | ACPI_MODULE_NAME("pstree") |
51 | 50 | ||
52 | /* Local prototypes */ | 51 | /* Local prototypes */ |
53 | |||
54 | #ifdef ACPI_OBSOLETE_FUNCTIONS | 52 | #ifdef ACPI_OBSOLETE_FUNCTIONS |
55 | union acpi_parse_object * | 53 | union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op); |
56 | acpi_ps_get_child ( | ||
57 | union acpi_parse_object *op); | ||
58 | #endif | 54 | #endif |
59 | 55 | ||
60 | |||
61 | /******************************************************************************* | 56 | /******************************************************************************* |
62 | * | 57 | * |
63 | * FUNCTION: acpi_ps_get_arg | 58 | * FUNCTION: acpi_ps_get_arg |
@@ -71,21 +66,16 @@ acpi_ps_get_child ( | |||
71 | * | 66 | * |
72 | ******************************************************************************/ | 67 | ******************************************************************************/ |
73 | 68 | ||
74 | union acpi_parse_object * | 69 | union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn) |
75 | acpi_ps_get_arg ( | ||
76 | union acpi_parse_object *op, | ||
77 | u32 argn) | ||
78 | { | 70 | { |
79 | union acpi_parse_object *arg = NULL; | 71 | union acpi_parse_object *arg = NULL; |
80 | const struct acpi_opcode_info *op_info; | 72 | const struct acpi_opcode_info *op_info; |
81 | |||
82 | |||
83 | ACPI_FUNCTION_ENTRY (); | ||
84 | 73 | ||
74 | ACPI_FUNCTION_ENTRY(); | ||
85 | 75 | ||
86 | /* Get the info structure for this opcode */ | 76 | /* Get the info structure for this opcode */ |
87 | 77 | ||
88 | op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); | 78 | op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); |
89 | if (op_info->class == AML_CLASS_UNKNOWN) { | 79 | if (op_info->class == AML_CLASS_UNKNOWN) { |
90 | /* Invalid opcode or ASCII character */ | 80 | /* Invalid opcode or ASCII character */ |
91 | 81 | ||
@@ -111,7 +101,6 @@ acpi_ps_get_arg ( | |||
111 | return (arg); | 101 | return (arg); |
112 | } | 102 | } |
113 | 103 | ||
114 | |||
115 | /******************************************************************************* | 104 | /******************************************************************************* |
116 | * | 105 | * |
117 | * FUNCTION: acpi_ps_append_arg | 106 | * FUNCTION: acpi_ps_append_arg |
@@ -126,16 +115,12 @@ acpi_ps_get_arg ( | |||
126 | ******************************************************************************/ | 115 | ******************************************************************************/ |
127 | 116 | ||
128 | void | 117 | void |
129 | acpi_ps_append_arg ( | 118 | acpi_ps_append_arg(union acpi_parse_object *op, union acpi_parse_object *arg) |
130 | union acpi_parse_object *op, | ||
131 | union acpi_parse_object *arg) | ||
132 | { | 119 | { |
133 | union acpi_parse_object *prev_arg; | 120 | union acpi_parse_object *prev_arg; |
134 | const struct acpi_opcode_info *op_info; | 121 | const struct acpi_opcode_info *op_info; |
135 | |||
136 | |||
137 | ACPI_FUNCTION_ENTRY (); | ||
138 | 122 | ||
123 | ACPI_FUNCTION_ENTRY(); | ||
139 | 124 | ||
140 | if (!op) { | 125 | if (!op) { |
141 | return; | 126 | return; |
@@ -143,12 +128,11 @@ acpi_ps_append_arg ( | |||
143 | 128 | ||
144 | /* Get the info structure for this opcode */ | 129 | /* Get the info structure for this opcode */ |
145 | 130 | ||
146 | op_info = acpi_ps_get_opcode_info (op->common.aml_opcode); | 131 | op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); |
147 | if (op_info->class == AML_CLASS_UNKNOWN) { | 132 | if (op_info->class == AML_CLASS_UNKNOWN) { |
148 | /* Invalid opcode */ | 133 | /* Invalid opcode */ |
149 | 134 | ||
150 | ACPI_REPORT_ERROR (("ps_append_arg: Invalid AML Opcode: 0x%2.2X\n", | 135 | ACPI_REPORT_ERROR(("ps_append_arg: Invalid AML Opcode: 0x%2.2X\n", op->common.aml_opcode)); |
151 | op->common.aml_opcode)); | ||
152 | return; | 136 | return; |
153 | } | 137 | } |
154 | 138 | ||
@@ -170,8 +154,7 @@ acpi_ps_append_arg ( | |||
170 | prev_arg = prev_arg->common.next; | 154 | prev_arg = prev_arg->common.next; |
171 | } | 155 | } |
172 | prev_arg->common.next = arg; | 156 | prev_arg->common.next = arg; |
173 | } | 157 | } else { |
174 | else { | ||
175 | /* No argument list, this will be the first argument */ | 158 | /* No argument list, this will be the first argument */ |
176 | 159 | ||
177 | op->common.value.arg = arg; | 160 | op->common.value.arg = arg; |
@@ -185,7 +168,6 @@ acpi_ps_append_arg ( | |||
185 | } | 168 | } |
186 | } | 169 | } |
187 | 170 | ||
188 | |||
189 | #ifdef ACPI_FUTURE_USAGE | 171 | #ifdef ACPI_FUTURE_USAGE |
190 | /******************************************************************************* | 172 | /******************************************************************************* |
191 | * | 173 | * |
@@ -201,18 +183,14 @@ acpi_ps_append_arg ( | |||
201 | * | 183 | * |
202 | ******************************************************************************/ | 184 | ******************************************************************************/ |
203 | 185 | ||
204 | union acpi_parse_object * | 186 | union acpi_parse_object *acpi_ps_get_depth_next(union acpi_parse_object *origin, |
205 | acpi_ps_get_depth_next ( | 187 | union acpi_parse_object *op) |
206 | union acpi_parse_object *origin, | ||
207 | union acpi_parse_object *op) | ||
208 | { | 188 | { |
209 | union acpi_parse_object *next = NULL; | 189 | union acpi_parse_object *next = NULL; |
210 | union acpi_parse_object *parent; | 190 | union acpi_parse_object *parent; |
211 | union acpi_parse_object *arg; | 191 | union acpi_parse_object *arg; |
212 | |||
213 | |||
214 | ACPI_FUNCTION_ENTRY (); | ||
215 | 192 | ||
193 | ACPI_FUNCTION_ENTRY(); | ||
216 | 194 | ||
217 | if (!op) { | 195 | if (!op) { |
218 | return (NULL); | 196 | return (NULL); |
@@ -220,7 +198,7 @@ acpi_ps_get_depth_next ( | |||
220 | 198 | ||
221 | /* Look for an argument or child */ | 199 | /* Look for an argument or child */ |
222 | 200 | ||
223 | next = acpi_ps_get_arg (op, 0); | 201 | next = acpi_ps_get_arg(op, 0); |
224 | if (next) { | 202 | if (next) { |
225 | return (next); | 203 | return (next); |
226 | } | 204 | } |
@@ -237,7 +215,7 @@ acpi_ps_get_depth_next ( | |||
237 | parent = op->common.parent; | 215 | parent = op->common.parent; |
238 | 216 | ||
239 | while (parent) { | 217 | while (parent) { |
240 | arg = acpi_ps_get_arg (parent, 0); | 218 | arg = acpi_ps_get_arg(parent, 0); |
241 | while (arg && (arg != origin) && (arg != op)) { | 219 | while (arg && (arg != origin) && (arg != op)) { |
242 | arg = arg->common.next; | 220 | arg = arg->common.next; |
243 | } | 221 | } |
@@ -261,7 +239,6 @@ acpi_ps_get_depth_next ( | |||
261 | return (next); | 239 | return (next); |
262 | } | 240 | } |
263 | 241 | ||
264 | |||
265 | #ifdef ACPI_OBSOLETE_FUNCTIONS | 242 | #ifdef ACPI_OBSOLETE_FUNCTIONS |
266 | /******************************************************************************* | 243 | /******************************************************************************* |
267 | * | 244 | * |
@@ -275,15 +252,11 @@ acpi_ps_get_depth_next ( | |||
275 | * | 252 | * |
276 | ******************************************************************************/ | 253 | ******************************************************************************/ |
277 | 254 | ||
278 | union acpi_parse_object * | 255 | union acpi_parse_object *acpi_ps_get_child(union acpi_parse_object *op) |
279 | acpi_ps_get_child ( | ||
280 | union acpi_parse_object *op) | ||
281 | { | 256 | { |
282 | union acpi_parse_object *child = NULL; | 257 | union acpi_parse_object *child = NULL; |
283 | |||
284 | |||
285 | ACPI_FUNCTION_ENTRY (); | ||
286 | 258 | ||
259 | ACPI_FUNCTION_ENTRY(); | ||
287 | 260 | ||
288 | switch (op->common.aml_opcode) { | 261 | switch (op->common.aml_opcode) { |
289 | case AML_SCOPE_OP: | 262 | case AML_SCOPE_OP: |
@@ -292,10 +265,9 @@ acpi_ps_get_child ( | |||
292 | case AML_THERMAL_ZONE_OP: | 265 | case AML_THERMAL_ZONE_OP: |
293 | case AML_INT_METHODCALL_OP: | 266 | case AML_INT_METHODCALL_OP: |
294 | 267 | ||
295 | child = acpi_ps_get_arg (op, 0); | 268 | child = acpi_ps_get_arg(op, 0); |
296 | break; | 269 | break; |
297 | 270 | ||
298 | |||
299 | case AML_BUFFER_OP: | 271 | case AML_BUFFER_OP: |
300 | case AML_PACKAGE_OP: | 272 | case AML_PACKAGE_OP: |
301 | case AML_METHOD_OP: | 273 | case AML_METHOD_OP: |
@@ -303,24 +275,21 @@ acpi_ps_get_child ( | |||
303 | case AML_WHILE_OP: | 275 | case AML_WHILE_OP: |
304 | case AML_FIELD_OP: | 276 | case AML_FIELD_OP: |
305 | 277 | ||
306 | child = acpi_ps_get_arg (op, 1); | 278 | child = acpi_ps_get_arg(op, 1); |
307 | break; | 279 | break; |
308 | 280 | ||
309 | |||
310 | case AML_POWER_RES_OP: | 281 | case AML_POWER_RES_OP: |
311 | case AML_INDEX_FIELD_OP: | 282 | case AML_INDEX_FIELD_OP: |
312 | 283 | ||
313 | child = acpi_ps_get_arg (op, 2); | 284 | child = acpi_ps_get_arg(op, 2); |
314 | break; | 285 | break; |
315 | 286 | ||
316 | |||
317 | case AML_PROCESSOR_OP: | 287 | case AML_PROCESSOR_OP: |
318 | case AML_BANK_FIELD_OP: | 288 | case AML_BANK_FIELD_OP: |
319 | 289 | ||
320 | child = acpi_ps_get_arg (op, 3); | 290 | child = acpi_ps_get_arg(op, 3); |
321 | break; | 291 | break; |
322 | 292 | ||
323 | |||
324 | default: | 293 | default: |
325 | /* All others have no children */ | 294 | /* All others have no children */ |
326 | break; | 295 | break; |
@@ -330,5 +299,4 @@ acpi_ps_get_child ( | |||
330 | } | 299 | } |
331 | #endif | 300 | #endif |
332 | 301 | ||
333 | #endif /* ACPI_FUTURE_USAGE */ | 302 | #endif /* ACPI_FUTURE_USAGE */ |
334 | |||
diff --git a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c index 4221b41ae1a6..2075efbb4324 100644 --- a/drivers/acpi/parser/psutils.c +++ b/drivers/acpi/parser/psutils.c | |||
@@ -41,14 +41,12 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
48 | 47 | ||
49 | #define _COMPONENT ACPI_PARSER | 48 | #define _COMPONENT ACPI_PARSER |
50 | ACPI_MODULE_NAME ("psutils") | 49 | ACPI_MODULE_NAME("psutils") |
51 | |||
52 | 50 | ||
53 | /******************************************************************************* | 51 | /******************************************************************************* |
54 | * | 52 | * |
@@ -61,15 +59,11 @@ | |||
61 | * DESCRIPTION: Create a Scope and associated namepath op with the root name | 59 | * DESCRIPTION: Create a Scope and associated namepath op with the root name |
62 | * | 60 | * |
63 | ******************************************************************************/ | 61 | ******************************************************************************/ |
64 | 62 | union acpi_parse_object *acpi_ps_create_scope_op(void) | |
65 | union acpi_parse_object * | ||
66 | acpi_ps_create_scope_op ( | ||
67 | void) | ||
68 | { | 63 | { |
69 | union acpi_parse_object *scope_op; | 64 | union acpi_parse_object *scope_op; |
70 | 65 | ||
71 | 66 | scope_op = acpi_ps_alloc_op(AML_SCOPE_OP); | |
72 | scope_op = acpi_ps_alloc_op (AML_SCOPE_OP); | ||
73 | if (!scope_op) { | 67 | if (!scope_op) { |
74 | return (NULL); | 68 | return (NULL); |
75 | } | 69 | } |
@@ -78,7 +72,6 @@ acpi_ps_create_scope_op ( | |||
78 | return (scope_op); | 72 | return (scope_op); |
79 | } | 73 | } |
80 | 74 | ||
81 | |||
82 | /******************************************************************************* | 75 | /******************************************************************************* |
83 | * | 76 | * |
84 | * FUNCTION: acpi_ps_init_op | 77 | * FUNCTION: acpi_ps_init_op |
@@ -92,23 +85,19 @@ acpi_ps_create_scope_op ( | |||
92 | * | 85 | * |
93 | ******************************************************************************/ | 86 | ******************************************************************************/ |
94 | 87 | ||
95 | void | 88 | void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode) |
96 | acpi_ps_init_op ( | ||
97 | union acpi_parse_object *op, | ||
98 | u16 opcode) | ||
99 | { | 89 | { |
100 | ACPI_FUNCTION_ENTRY (); | 90 | ACPI_FUNCTION_ENTRY(); |
101 | |||
102 | 91 | ||
103 | op->common.data_type = ACPI_DESC_TYPE_PARSER; | 92 | op->common.data_type = ACPI_DESC_TYPE_PARSER; |
104 | op->common.aml_opcode = opcode; | 93 | op->common.aml_opcode = opcode; |
105 | 94 | ||
106 | ACPI_DISASM_ONLY_MEMBERS (ACPI_STRNCPY (op->common.aml_op_name, | 95 | ACPI_DISASM_ONLY_MEMBERS(ACPI_STRNCPY(op->common.aml_op_name, |
107 | (acpi_ps_get_opcode_info (opcode))->name, | 96 | (acpi_ps_get_opcode_info |
108 | sizeof (op->common.aml_op_name))); | 97 | (opcode))->name, |
98 | sizeof(op->common.aml_op_name))); | ||
109 | } | 99 | } |
110 | 100 | ||
111 | |||
112 | /******************************************************************************* | 101 | /******************************************************************************* |
113 | * | 102 | * |
114 | * FUNCTION: acpi_ps_alloc_op | 103 | * FUNCTION: acpi_ps_alloc_op |
@@ -123,29 +112,23 @@ acpi_ps_init_op ( | |||
123 | * | 112 | * |
124 | ******************************************************************************/ | 113 | ******************************************************************************/ |
125 | 114 | ||
126 | union acpi_parse_object* | 115 | union acpi_parse_object *acpi_ps_alloc_op(u16 opcode) |
127 | acpi_ps_alloc_op ( | ||
128 | u16 opcode) | ||
129 | { | 116 | { |
130 | union acpi_parse_object *op; | 117 | union acpi_parse_object *op; |
131 | const struct acpi_opcode_info *op_info; | 118 | const struct acpi_opcode_info *op_info; |
132 | u8 flags = ACPI_PARSEOP_GENERIC; | 119 | u8 flags = ACPI_PARSEOP_GENERIC; |
133 | |||
134 | |||
135 | ACPI_FUNCTION_ENTRY (); | ||
136 | 120 | ||
121 | ACPI_FUNCTION_ENTRY(); | ||
137 | 122 | ||
138 | op_info = acpi_ps_get_opcode_info (opcode); | 123 | op_info = acpi_ps_get_opcode_info(opcode); |
139 | 124 | ||
140 | /* Determine type of parse_op required */ | 125 | /* Determine type of parse_op required */ |
141 | 126 | ||
142 | if (op_info->flags & AML_DEFER) { | 127 | if (op_info->flags & AML_DEFER) { |
143 | flags = ACPI_PARSEOP_DEFERRED; | 128 | flags = ACPI_PARSEOP_DEFERRED; |
144 | } | 129 | } else if (op_info->flags & AML_NAMED) { |
145 | else if (op_info->flags & AML_NAMED) { | ||
146 | flags = ACPI_PARSEOP_NAMED; | 130 | flags = ACPI_PARSEOP_NAMED; |
147 | } | 131 | } else if (opcode == AML_INT_BYTELIST_OP) { |
148 | else if (opcode == AML_INT_BYTELIST_OP) { | ||
149 | flags = ACPI_PARSEOP_BYTELIST; | 132 | flags = ACPI_PARSEOP_BYTELIST; |
150 | } | 133 | } |
151 | 134 | ||
@@ -154,27 +137,25 @@ acpi_ps_alloc_op ( | |||
154 | if (flags == ACPI_PARSEOP_GENERIC) { | 137 | if (flags == ACPI_PARSEOP_GENERIC) { |
155 | /* The generic op (default) is by far the most common (16 to 1) */ | 138 | /* The generic op (default) is by far the most common (16 to 1) */ |
156 | 139 | ||
157 | op = acpi_os_acquire_object (acpi_gbl_ps_node_cache); | 140 | op = acpi_os_acquire_object(acpi_gbl_ps_node_cache); |
158 | memset(op, 0, sizeof(struct acpi_parse_obj_common)); | 141 | memset(op, 0, sizeof(struct acpi_parse_obj_common)); |
159 | } | 142 | } else { |
160 | else { | ||
161 | /* Extended parseop */ | 143 | /* Extended parseop */ |
162 | 144 | ||
163 | op = acpi_os_acquire_object (acpi_gbl_ps_node_ext_cache); | 145 | op = acpi_os_acquire_object(acpi_gbl_ps_node_ext_cache); |
164 | memset(op, 0, sizeof(struct acpi_parse_obj_named)); | 146 | memset(op, 0, sizeof(struct acpi_parse_obj_named)); |
165 | } | 147 | } |
166 | 148 | ||
167 | /* Initialize the Op */ | 149 | /* Initialize the Op */ |
168 | 150 | ||
169 | if (op) { | 151 | if (op) { |
170 | acpi_ps_init_op (op, opcode); | 152 | acpi_ps_init_op(op, opcode); |
171 | op->common.flags = flags; | 153 | op->common.flags = flags; |
172 | } | 154 | } |
173 | 155 | ||
174 | return (op); | 156 | return (op); |
175 | } | 157 | } |
176 | 158 | ||
177 | |||
178 | /******************************************************************************* | 159 | /******************************************************************************* |
179 | * | 160 | * |
180 | * FUNCTION: acpi_ps_free_op | 161 | * FUNCTION: acpi_ps_free_op |
@@ -188,26 +169,22 @@ acpi_ps_alloc_op ( | |||
188 | * | 169 | * |
189 | ******************************************************************************/ | 170 | ******************************************************************************/ |
190 | 171 | ||
191 | void | 172 | void acpi_ps_free_op(union acpi_parse_object *op) |
192 | acpi_ps_free_op ( | ||
193 | union acpi_parse_object *op) | ||
194 | { | 173 | { |
195 | ACPI_FUNCTION_NAME ("ps_free_op"); | 174 | ACPI_FUNCTION_NAME("ps_free_op"); |
196 | |||
197 | 175 | ||
198 | if (op->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { | 176 | if (op->common.aml_opcode == AML_INT_RETURN_VALUE_OP) { |
199 | ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Free retval op: %p\n", op)); | 177 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Free retval op: %p\n", |
178 | op)); | ||
200 | } | 179 | } |
201 | 180 | ||
202 | if (op->common.flags & ACPI_PARSEOP_GENERIC) { | 181 | if (op->common.flags & ACPI_PARSEOP_GENERIC) { |
203 | (void) acpi_os_release_object (acpi_gbl_ps_node_cache, op); | 182 | (void)acpi_os_release_object(acpi_gbl_ps_node_cache, op); |
204 | } | 183 | } else { |
205 | else { | 184 | (void)acpi_os_release_object(acpi_gbl_ps_node_ext_cache, op); |
206 | (void) acpi_os_release_object (acpi_gbl_ps_node_ext_cache, op); | ||
207 | } | 185 | } |
208 | } | 186 | } |
209 | 187 | ||
210 | |||
211 | /******************************************************************************* | 188 | /******************************************************************************* |
212 | * | 189 | * |
213 | * FUNCTION: Utility functions | 190 | * FUNCTION: Utility functions |
@@ -216,36 +193,27 @@ acpi_ps_free_op ( | |||
216 | * | 193 | * |
217 | ******************************************************************************/ | 194 | ******************************************************************************/ |
218 | 195 | ||
219 | |||
220 | /* | 196 | /* |
221 | * Is "c" a namestring lead character? | 197 | * Is "c" a namestring lead character? |
222 | */ | 198 | */ |
223 | u8 | 199 | u8 acpi_ps_is_leading_char(u32 c) |
224 | acpi_ps_is_leading_char ( | ||
225 | u32 c) | ||
226 | { | 200 | { |
227 | return ((u8) (c == '_' || (c >= 'A' && c <= 'Z'))); | 201 | return ((u8) (c == '_' || (c >= 'A' && c <= 'Z'))); |
228 | } | 202 | } |
229 | 203 | ||
230 | |||
231 | /* | 204 | /* |
232 | * Is "c" a namestring prefix character? | 205 | * Is "c" a namestring prefix character? |
233 | */ | 206 | */ |
234 | u8 | 207 | u8 acpi_ps_is_prefix_char(u32 c) |
235 | acpi_ps_is_prefix_char ( | ||
236 | u32 c) | ||
237 | { | 208 | { |
238 | return ((u8) (c == '\\' || c == '^')); | 209 | return ((u8) (c == '\\' || c == '^')); |
239 | } | 210 | } |
240 | 211 | ||
241 | |||
242 | /* | 212 | /* |
243 | * Get op's name (4-byte name segment) or 0 if unnamed | 213 | * Get op's name (4-byte name segment) or 0 if unnamed |
244 | */ | 214 | */ |
245 | #ifdef ACPI_FUTURE_USAGE | 215 | #ifdef ACPI_FUTURE_USAGE |
246 | u32 | 216 | u32 acpi_ps_get_name(union acpi_parse_object * op) |
247 | acpi_ps_get_name ( | ||
248 | union acpi_parse_object *op) | ||
249 | { | 217 | { |
250 | 218 | ||
251 | /* The "generic" object has no name associated with it */ | 219 | /* The "generic" object has no name associated with it */ |
@@ -258,16 +226,12 @@ acpi_ps_get_name ( | |||
258 | 226 | ||
259 | return (op->named.name); | 227 | return (op->named.name); |
260 | } | 228 | } |
261 | #endif /* ACPI_FUTURE_USAGE */ | 229 | #endif /* ACPI_FUTURE_USAGE */ |
262 | |||
263 | 230 | ||
264 | /* | 231 | /* |
265 | * Set op's name | 232 | * Set op's name |
266 | */ | 233 | */ |
267 | void | 234 | void acpi_ps_set_name(union acpi_parse_object *op, u32 name) |
268 | acpi_ps_set_name ( | ||
269 | union acpi_parse_object *op, | ||
270 | u32 name) | ||
271 | { | 235 | { |
272 | 236 | ||
273 | /* The "generic" object has no name associated with it */ | 237 | /* The "generic" object has no name associated with it */ |
@@ -278,4 +242,3 @@ acpi_ps_set_name ( | |||
278 | 242 | ||
279 | op->named.name = name; | 243 | op->named.name = name; |
280 | } | 244 | } |
281 | |||
diff --git a/drivers/acpi/parser/pswalk.c b/drivers/acpi/parser/pswalk.c index 9d20cb2ceb51..08f2321b6ded 100644 --- a/drivers/acpi/parser/pswalk.c +++ b/drivers/acpi/parser/pswalk.c | |||
@@ -41,13 +41,11 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | 46 | ||
48 | #define _COMPONENT ACPI_PARSER | 47 | #define _COMPONENT ACPI_PARSER |
49 | ACPI_MODULE_NAME ("pswalk") | 48 | ACPI_MODULE_NAME("pswalk") |
50 | |||
51 | 49 | ||
52 | /******************************************************************************* | 50 | /******************************************************************************* |
53 | * | 51 | * |
@@ -60,18 +58,13 @@ | |||
60 | * DESCRIPTION: Delete a portion of or an entire parse tree. | 58 | * DESCRIPTION: Delete a portion of or an entire parse tree. |
61 | * | 59 | * |
62 | ******************************************************************************/ | 60 | ******************************************************************************/ |
63 | 61 | void acpi_ps_delete_parse_tree(union acpi_parse_object *subtree_root) | |
64 | void | ||
65 | acpi_ps_delete_parse_tree ( | ||
66 | union acpi_parse_object *subtree_root) | ||
67 | { | 62 | { |
68 | union acpi_parse_object *op = subtree_root; | 63 | union acpi_parse_object *op = subtree_root; |
69 | union acpi_parse_object *next = NULL; | 64 | union acpi_parse_object *next = NULL; |
70 | union acpi_parse_object *parent = NULL; | 65 | union acpi_parse_object *parent = NULL; |
71 | |||
72 | |||
73 | ACPI_FUNCTION_TRACE_PTR ("ps_delete_parse_tree", subtree_root); | ||
74 | 66 | ||
67 | ACPI_FUNCTION_TRACE_PTR("ps_delete_parse_tree", subtree_root); | ||
75 | 68 | ||
76 | /* Visit all nodes in the subtree */ | 69 | /* Visit all nodes in the subtree */ |
77 | 70 | ||
@@ -81,7 +74,7 @@ acpi_ps_delete_parse_tree ( | |||
81 | if (op != parent) { | 74 | if (op != parent) { |
82 | /* Look for an argument or child of the current op */ | 75 | /* Look for an argument or child of the current op */ |
83 | 76 | ||
84 | next = acpi_ps_get_arg (op, 0); | 77 | next = acpi_ps_get_arg(op, 0); |
85 | if (next) { | 78 | if (next) { |
86 | /* Still going downward in tree (Op is not completed yet) */ | 79 | /* Still going downward in tree (Op is not completed yet) */ |
87 | 80 | ||
@@ -95,7 +88,7 @@ acpi_ps_delete_parse_tree ( | |||
95 | next = op->common.next; | 88 | next = op->common.next; |
96 | parent = op->common.parent; | 89 | parent = op->common.parent; |
97 | 90 | ||
98 | acpi_ps_free_op (op); | 91 | acpi_ps_free_op(op); |
99 | 92 | ||
100 | /* If we are back to the starting point, the walk is complete. */ | 93 | /* If we are back to the starting point, the walk is complete. */ |
101 | 94 | ||
@@ -104,8 +97,7 @@ acpi_ps_delete_parse_tree ( | |||
104 | } | 97 | } |
105 | if (next) { | 98 | if (next) { |
106 | op = next; | 99 | op = next; |
107 | } | 100 | } else { |
108 | else { | ||
109 | op = parent; | 101 | op = parent; |
110 | } | 102 | } |
111 | } | 103 | } |
diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c index d1541fabaf0a..80c67f2d3dd2 100644 --- a/drivers/acpi/parser/psxface.c +++ b/drivers/acpi/parser/psxface.c | |||
@@ -41,27 +41,19 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acparser.h> | 45 | #include <acpi/acparser.h> |
47 | #include <acpi/acdispat.h> | 46 | #include <acpi/acdispat.h> |
48 | #include <acpi/acinterp.h> | 47 | #include <acpi/acinterp.h> |
49 | 48 | ||
50 | |||
51 | #define _COMPONENT ACPI_PARSER | 49 | #define _COMPONENT ACPI_PARSER |
52 | ACPI_MODULE_NAME ("psxface") | 50 | ACPI_MODULE_NAME("psxface") |
53 | 51 | ||
54 | /* Local Prototypes */ | 52 | /* Local Prototypes */ |
55 | 53 | static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info); | |
56 | static acpi_status | ||
57 | acpi_ps_execute_pass ( | ||
58 | struct acpi_parameter_info *info); | ||
59 | 54 | ||
60 | static void | 55 | static void |
61 | acpi_ps_update_parameter_list ( | 56 | acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action); |
62 | struct acpi_parameter_info *info, | ||
63 | u16 action); | ||
64 | |||
65 | 57 | ||
66 | /******************************************************************************* | 58 | /******************************************************************************* |
67 | * | 59 | * |
@@ -86,27 +78,24 @@ acpi_ps_update_parameter_list ( | |||
86 | * | 78 | * |
87 | ******************************************************************************/ | 79 | ******************************************************************************/ |
88 | 80 | ||
89 | acpi_status | 81 | acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info) |
90 | acpi_ps_execute_method ( | ||
91 | struct acpi_parameter_info *info) | ||
92 | { | 82 | { |
93 | acpi_status status; | 83 | acpi_status status; |
94 | |||
95 | |||
96 | ACPI_FUNCTION_TRACE ("ps_execute_method"); | ||
97 | 84 | ||
85 | ACPI_FUNCTION_TRACE("ps_execute_method"); | ||
98 | 86 | ||
99 | /* Validate the Info and method Node */ | 87 | /* Validate the Info and method Node */ |
100 | 88 | ||
101 | if (!info || !info->node) { | 89 | if (!info || !info->node) { |
102 | return_ACPI_STATUS (AE_NULL_ENTRY); | 90 | return_ACPI_STATUS(AE_NULL_ENTRY); |
103 | } | 91 | } |
104 | 92 | ||
105 | /* Init for new method, wait on concurrency semaphore */ | 93 | /* Init for new method, wait on concurrency semaphore */ |
106 | 94 | ||
107 | status = acpi_ds_begin_method_execution (info->node, info->obj_desc, NULL); | 95 | status = |
108 | if (ACPI_FAILURE (status)) { | 96 | acpi_ds_begin_method_execution(info->node, info->obj_desc, NULL); |
109 | return_ACPI_STATUS (status); | 97 | if (ACPI_FAILURE(status)) { |
98 | return_ACPI_STATUS(status); | ||
110 | } | 99 | } |
111 | 100 | ||
112 | /* | 101 | /* |
@@ -114,55 +103,54 @@ acpi_ps_execute_method ( | |||
114 | * objects (such as Operation Regions) can be created during the | 103 | * objects (such as Operation Regions) can be created during the |
115 | * first pass parse. | 104 | * first pass parse. |
116 | */ | 105 | */ |
117 | status = acpi_ut_allocate_owner_id (&info->obj_desc->method.owner_id); | 106 | status = acpi_ut_allocate_owner_id(&info->obj_desc->method.owner_id); |
118 | if (ACPI_FAILURE (status)) { | 107 | if (ACPI_FAILURE(status)) { |
119 | return_ACPI_STATUS (status); | 108 | return_ACPI_STATUS(status); |
120 | } | 109 | } |
121 | 110 | ||
122 | /* | 111 | /* |
123 | * The caller "owns" the parameters, so give each one an extra | 112 | * The caller "owns" the parameters, so give each one an extra |
124 | * reference | 113 | * reference |
125 | */ | 114 | */ |
126 | acpi_ps_update_parameter_list (info, REF_INCREMENT); | 115 | acpi_ps_update_parameter_list(info, REF_INCREMENT); |
127 | 116 | ||
128 | /* | 117 | /* |
129 | * 1) Perform the first pass parse of the method to enter any | 118 | * 1) Perform the first pass parse of the method to enter any |
130 | * named objects that it creates into the namespace | 119 | * named objects that it creates into the namespace |
131 | */ | 120 | */ |
132 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 121 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
133 | "**** Begin Method Parse **** Entry=%p obj=%p\n", | 122 | "**** Begin Method Parse **** Entry=%p obj=%p\n", |
134 | info->node, info->obj_desc)); | 123 | info->node, info->obj_desc)); |
135 | 124 | ||
136 | info->pass_number = 1; | 125 | info->pass_number = 1; |
137 | status = acpi_ps_execute_pass (info); | 126 | status = acpi_ps_execute_pass(info); |
138 | if (ACPI_FAILURE (status)) { | 127 | if (ACPI_FAILURE(status)) { |
139 | goto cleanup; | 128 | goto cleanup; |
140 | } | 129 | } |
141 | 130 | ||
142 | /* | 131 | /* |
143 | * 2) Execute the method. Performs second pass parse simultaneously | 132 | * 2) Execute the method. Performs second pass parse simultaneously |
144 | */ | 133 | */ |
145 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, | 134 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
146 | "**** Begin Method Execution **** Entry=%p obj=%p\n", | 135 | "**** Begin Method Execution **** Entry=%p obj=%p\n", |
147 | info->node, info->obj_desc)); | 136 | info->node, info->obj_desc)); |
148 | 137 | ||
149 | info->pass_number = 3; | 138 | info->pass_number = 3; |
150 | status = acpi_ps_execute_pass (info); | 139 | status = acpi_ps_execute_pass(info); |
151 | |||
152 | 140 | ||
153 | cleanup: | 141 | cleanup: |
154 | if (info->obj_desc->method.owner_id) { | 142 | if (info->obj_desc->method.owner_id) { |
155 | acpi_ut_release_owner_id (&info->obj_desc->method.owner_id); | 143 | acpi_ut_release_owner_id(&info->obj_desc->method.owner_id); |
156 | } | 144 | } |
157 | 145 | ||
158 | /* Take away the extra reference that we gave the parameters above */ | 146 | /* Take away the extra reference that we gave the parameters above */ |
159 | 147 | ||
160 | acpi_ps_update_parameter_list (info, REF_DECREMENT); | 148 | acpi_ps_update_parameter_list(info, REF_DECREMENT); |
161 | 149 | ||
162 | /* Exit now if error above */ | 150 | /* Exit now if error above */ |
163 | 151 | ||
164 | if (ACPI_FAILURE (status)) { | 152 | if (ACPI_FAILURE(status)) { |
165 | return_ACPI_STATUS (status); | 153 | return_ACPI_STATUS(status); |
166 | } | 154 | } |
167 | 155 | ||
168 | /* | 156 | /* |
@@ -170,17 +158,17 @@ cleanup: | |||
170 | * a control exception code | 158 | * a control exception code |
171 | */ | 159 | */ |
172 | if (info->return_object) { | 160 | if (info->return_object) { |
173 | ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Method returned obj_desc=%p\n", | 161 | ACPI_DEBUG_PRINT((ACPI_DB_PARSE, |
174 | info->return_object)); | 162 | "Method returned obj_desc=%p\n", |
175 | ACPI_DUMP_STACK_ENTRY (info->return_object); | 163 | info->return_object)); |
164 | ACPI_DUMP_STACK_ENTRY(info->return_object); | ||
176 | 165 | ||
177 | status = AE_CTRL_RETURN_VALUE; | 166 | status = AE_CTRL_RETURN_VALUE; |
178 | } | 167 | } |
179 | 168 | ||
180 | return_ACPI_STATUS (status); | 169 | return_ACPI_STATUS(status); |
181 | } | 170 | } |
182 | 171 | ||
183 | |||
184 | /******************************************************************************* | 172 | /******************************************************************************* |
185 | * | 173 | * |
186 | * FUNCTION: acpi_ps_update_parameter_list | 174 | * FUNCTION: acpi_ps_update_parameter_list |
@@ -196,26 +184,23 @@ cleanup: | |||
196 | ******************************************************************************/ | 184 | ******************************************************************************/ |
197 | 185 | ||
198 | static void | 186 | static void |
199 | acpi_ps_update_parameter_list ( | 187 | acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action) |
200 | struct acpi_parameter_info *info, | ||
201 | u16 action) | ||
202 | { | 188 | { |
203 | acpi_native_uint i; | 189 | acpi_native_uint i; |
204 | |||
205 | 190 | ||
206 | if ((info->parameter_type == ACPI_PARAM_ARGS) && | 191 | if ((info->parameter_type == ACPI_PARAM_ARGS) && (info->parameters)) { |
207 | (info->parameters)) { | ||
208 | /* Update reference count for each parameter */ | 192 | /* Update reference count for each parameter */ |
209 | 193 | ||
210 | for (i = 0; info->parameters[i]; i++) { | 194 | for (i = 0; info->parameters[i]; i++) { |
211 | /* Ignore errors, just do them all */ | 195 | /* Ignore errors, just do them all */ |
212 | 196 | ||
213 | (void) acpi_ut_update_object_reference (info->parameters[i], action); | 197 | (void)acpi_ut_update_object_reference(info-> |
198 | parameters[i], | ||
199 | action); | ||
214 | } | 200 | } |
215 | } | 201 | } |
216 | } | 202 | } |
217 | 203 | ||
218 | |||
219 | /******************************************************************************* | 204 | /******************************************************************************* |
220 | * | 205 | * |
221 | * FUNCTION: acpi_ps_execute_pass | 206 | * FUNCTION: acpi_ps_execute_pass |
@@ -229,53 +214,48 @@ acpi_ps_update_parameter_list ( | |||
229 | * | 214 | * |
230 | ******************************************************************************/ | 215 | ******************************************************************************/ |
231 | 216 | ||
232 | static acpi_status | 217 | static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info) |
233 | acpi_ps_execute_pass ( | ||
234 | struct acpi_parameter_info *info) | ||
235 | { | 218 | { |
236 | acpi_status status; | 219 | acpi_status status; |
237 | union acpi_parse_object *op; | 220 | union acpi_parse_object *op; |
238 | struct acpi_walk_state *walk_state; | 221 | struct acpi_walk_state *walk_state; |
239 | |||
240 | |||
241 | ACPI_FUNCTION_TRACE ("ps_execute_pass"); | ||
242 | 222 | ||
223 | ACPI_FUNCTION_TRACE("ps_execute_pass"); | ||
243 | 224 | ||
244 | /* Create and init a Root Node */ | 225 | /* Create and init a Root Node */ |
245 | 226 | ||
246 | op = acpi_ps_create_scope_op (); | 227 | op = acpi_ps_create_scope_op(); |
247 | if (!op) { | 228 | if (!op) { |
248 | return_ACPI_STATUS (AE_NO_MEMORY); | 229 | return_ACPI_STATUS(AE_NO_MEMORY); |
249 | } | 230 | } |
250 | 231 | ||
251 | /* Create and initialize a new walk state */ | 232 | /* Create and initialize a new walk state */ |
252 | 233 | ||
253 | walk_state = acpi_ds_create_walk_state ( | 234 | walk_state = |
254 | info->obj_desc->method.owner_id, NULL, NULL, NULL); | 235 | acpi_ds_create_walk_state(info->obj_desc->method.owner_id, NULL, |
236 | NULL, NULL); | ||
255 | if (!walk_state) { | 237 | if (!walk_state) { |
256 | status = AE_NO_MEMORY; | 238 | status = AE_NO_MEMORY; |
257 | goto cleanup; | 239 | goto cleanup; |
258 | } | 240 | } |
259 | 241 | ||
260 | status = acpi_ds_init_aml_walk (walk_state, op, info->node, | 242 | status = acpi_ds_init_aml_walk(walk_state, op, info->node, |
261 | info->obj_desc->method.aml_start, | 243 | info->obj_desc->method.aml_start, |
262 | info->obj_desc->method.aml_length, | 244 | info->obj_desc->method.aml_length, |
263 | info->pass_number == 1 ? NULL : info, | 245 | info->pass_number == 1 ? NULL : info, |
264 | info->pass_number); | 246 | info->pass_number); |
265 | if (ACPI_FAILURE (status)) { | 247 | if (ACPI_FAILURE(status)) { |
266 | acpi_ds_delete_walk_state (walk_state); | 248 | acpi_ds_delete_walk_state(walk_state); |
267 | goto cleanup; | 249 | goto cleanup; |
268 | } | 250 | } |
269 | 251 | ||
270 | /* Parse the AML */ | 252 | /* Parse the AML */ |
271 | 253 | ||
272 | status = acpi_ps_parse_aml (walk_state); | 254 | status = acpi_ps_parse_aml(walk_state); |
273 | 255 | ||
274 | /* Walk state was deleted by parse_aml */ | 256 | /* Walk state was deleted by parse_aml */ |
275 | 257 | ||
276 | cleanup: | 258 | cleanup: |
277 | acpi_ps_delete_parse_tree (op); | 259 | acpi_ps_delete_parse_tree(op); |
278 | return_ACPI_STATUS (status); | 260 | return_ACPI_STATUS(status); |
279 | } | 261 | } |
280 | |||
281 | |||