[PATCH] W1: w1_netlink: New init/fini netlink callbacks.
[linux-2.6/verdex.git] / drivers / acpi / parser / psloop.c
blob088d33999d9076b17575502b0bb5fc99906e51a0
1 /******************************************************************************
3 * Module Name: psloop - Main AML parse loop
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
45 * Parse the AML and build an operation tree as most interpreters,
46 * like Perl, do. Parsing is done by hand rather than with a YACC
47 * generated parser to tightly constrain stack and dynamic memory
48 * usage. At the same time, parsing is kept flexible and the code
49 * fairly compact by parsing based on a list of AML opcode
50 * templates in aml_op_info[]
53 #include <acpi/acpi.h>
54 #include <acpi/acparser.h>
55 #include <acpi/acdispat.h>
56 #include <acpi/amlcode.h>
58 #define _COMPONENT ACPI_PARSER
59 ACPI_MODULE_NAME("psloop")
61 static u32 acpi_gbl_depth = 0;
63 /*******************************************************************************
65 * FUNCTION: acpi_ps_parse_loop
67 * PARAMETERS: walk_state - Current state
69 * RETURN: Status
71 * DESCRIPTION: Parse AML (pointed to by the current parser state) and return
72 * a tree of ops.
74 ******************************************************************************/
76 acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
78 acpi_status status = AE_OK;
79 acpi_status status2;
80 union acpi_parse_object *op = NULL; /* current op */
81 union acpi_parse_object *arg = NULL;
82 union acpi_parse_object *pre_op = NULL;
83 struct acpi_parse_state *parser_state;
84 u8 *aml_op_start = NULL;
86 ACPI_FUNCTION_TRACE_PTR("ps_parse_loop", walk_state);
88 if (walk_state->descending_callback == NULL) {
89 return_ACPI_STATUS(AE_BAD_PARAMETER);
92 parser_state = &walk_state->parser_state;
93 walk_state->arg_types = 0;
95 #if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
97 if (walk_state->walk_type & ACPI_WALK_METHOD_RESTART) {
98 /* We are restarting a preempted control method */
100 if (acpi_ps_has_completed_scope(parser_state)) {
102 * We must check if a predicate to an IF or WHILE statement
103 * was just completed
105 if ((parser_state->scope->parse_scope.op) &&
106 ((parser_state->scope->parse_scope.op->common.
107 aml_opcode == AML_IF_OP)
108 || (parser_state->scope->parse_scope.op->common.
109 aml_opcode == AML_WHILE_OP))
110 && (walk_state->control_state)
111 && (walk_state->control_state->common.state ==
112 ACPI_CONTROL_PREDICATE_EXECUTING)) {
114 * A predicate was just completed, get the value of the
115 * predicate and branch based on that value
117 walk_state->op = NULL;
118 status =
119 acpi_ds_get_predicate_value(walk_state,
120 ACPI_TO_POINTER
121 (TRUE));
122 if (ACPI_FAILURE(status)
123 && ((status & AE_CODE_MASK) !=
124 AE_CODE_CONTROL)) {
125 if (status == AE_AML_NO_RETURN_VALUE) {
126 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
127 "Invoked method did not return a value, %s\n",
128 acpi_format_exception
129 (status)));
132 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
133 "get_predicate Failed, %s\n",
134 acpi_format_exception
135 (status)));
136 return_ACPI_STATUS(status);
139 status =
140 acpi_ps_next_parse_state(walk_state, op,
141 status);
144 acpi_ps_pop_scope(parser_state, &op,
145 &walk_state->arg_types,
146 &walk_state->arg_count);
147 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
148 "Popped scope, Op=%p\n", op));
149 } else if (walk_state->prev_op) {
150 /* We were in the middle of an op */
152 op = walk_state->prev_op;
153 walk_state->arg_types = walk_state->prev_arg_types;
156 #endif
158 /* Iterative parsing loop, while there is more AML to process: */
160 while ((parser_state->aml < parser_state->aml_end) || (op)) {
161 aml_op_start = parser_state->aml;
162 if (!op) {
163 /* Get the next opcode from the AML stream */
165 walk_state->aml_offset =
166 (u32) ACPI_PTR_DIFF(parser_state->aml,
167 parser_state->aml_start);
168 walk_state->opcode = acpi_ps_peek_opcode(parser_state);
171 * First cut to determine what we have found:
172 * 1) A valid AML opcode
173 * 2) A name string
174 * 3) An unknown/invalid opcode
176 walk_state->op_info =
177 acpi_ps_get_opcode_info(walk_state->opcode);
178 switch (walk_state->op_info->class) {
179 case AML_CLASS_ASCII:
180 case AML_CLASS_PREFIX:
182 * Starts with a valid prefix or ASCII char, this is a name
183 * string. Convert the bare name string to a namepath.
185 walk_state->opcode = AML_INT_NAMEPATH_OP;
186 walk_state->arg_types = ARGP_NAMESTRING;
187 break;
189 case AML_CLASS_UNKNOWN:
191 /* The opcode is unrecognized. Just skip unknown opcodes */
193 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
194 "Found unknown opcode %X at AML address %p offset %X, ignoring\n",
195 walk_state->opcode,
196 parser_state->aml,
197 walk_state->aml_offset));
199 ACPI_DUMP_BUFFER(parser_state->aml, 128);
201 /* Assume one-byte bad opcode */
203 parser_state->aml++;
204 continue;
206 default:
208 /* Found opcode info, this is a normal opcode */
210 parser_state->aml +=
211 acpi_ps_get_opcode_size(walk_state->opcode);
212 walk_state->arg_types =
213 walk_state->op_info->parse_args;
214 break;
217 /* Create Op structure and append to parent's argument list */
219 if (walk_state->op_info->flags & AML_NAMED) {
220 /* Allocate a new pre_op if necessary */
222 if (!pre_op) {
223 pre_op =
224 acpi_ps_alloc_op(walk_state->
225 opcode);
226 if (!pre_op) {
227 status = AE_NO_MEMORY;
228 goto close_this_op;
232 pre_op->common.value.arg = NULL;
233 pre_op->common.aml_opcode = walk_state->opcode;
236 * Get and append arguments until we find the node that contains
237 * the name (the type ARGP_NAME).
239 while (GET_CURRENT_ARG_TYPE
240 (walk_state->arg_types)
242 (GET_CURRENT_ARG_TYPE
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)) {
252 goto close_this_op;
255 acpi_ps_append_arg(pre_op, arg);
256 INCREMENT_ARG_LIST(walk_state->
257 arg_types);
261 * Make sure that we found a NAME and didn't run out of
262 * arguments
264 if (!GET_CURRENT_ARG_TYPE
265 (walk_state->arg_types)) {
266 status = AE_AML_NO_OPERAND;
267 goto close_this_op;
270 /* We know that this arg is a name, move to next arg */
272 INCREMENT_ARG_LIST(walk_state->arg_types);
275 * Find the object. This will either insert the object into
276 * the namespace or simply look it up
278 walk_state->op = NULL;
280 status =
281 walk_state->descending_callback(walk_state,
282 &op);
283 if (ACPI_FAILURE(status)) {
284 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
285 "During name lookup/catalog, %s\n",
286 acpi_format_exception
287 (status)));
288 goto close_this_op;
291 if (!op) {
292 continue;
295 status =
296 acpi_ps_next_parse_state(walk_state, op,
297 status);
298 if (status == AE_CTRL_PENDING) {
299 status = AE_OK;
300 goto close_this_op;
303 if (ACPI_FAILURE(status)) {
304 goto close_this_op;
307 acpi_ps_append_arg(op,
308 pre_op->common.value.arg);
309 acpi_gbl_depth++;
311 if (op->common.aml_opcode == AML_REGION_OP) {
313 * Defer final parsing of an operation_region body,
314 * because we don't have enough info in the first pass
315 * to parse it correctly (i.e., there may be method
316 * calls within the term_arg elements of the body.)
318 * However, we must continue parsing because
319 * the opregion is not a standalone package --
320 * we don't know where the end is at this point.
322 * (Length is unknown until parse of the body complete)
324 op->named.data = aml_op_start;
325 op->named.length = 0;
327 } else {
328 /* Not a named opcode, just allocate Op and append to parent */
330 walk_state->op_info =
331 acpi_ps_get_opcode_info(walk_state->opcode);
332 op = acpi_ps_alloc_op(walk_state->opcode);
333 if (!op) {
334 status = AE_NO_MEMORY;
335 goto close_this_op;
338 if (walk_state->op_info->flags & AML_CREATE) {
340 * Backup to beginning of create_xXXfield declaration
341 * body_length is unknown until we parse the body
343 op->named.data = aml_op_start;
344 op->named.length = 0;
347 acpi_ps_append_arg(acpi_ps_get_parent_scope
348 (parser_state), op);
350 if ((walk_state->descending_callback != NULL)) {
352 * Find the object. This will either insert the object into
353 * the namespace or simply look it up
355 walk_state->op = op;
357 status =
358 walk_state->
359 descending_callback(walk_state,
360 &op);
361 status =
362 acpi_ps_next_parse_state(walk_state,
364 status);
365 if (status == AE_CTRL_PENDING) {
366 status = AE_OK;
367 goto close_this_op;
370 if (ACPI_FAILURE(status)) {
371 goto close_this_op;
376 op->common.aml_offset = walk_state->aml_offset;
378 if (walk_state->op_info) {
379 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
380 "Opcode %4.4X [%s] Op %p Aml %p aml_offset %5.5X\n",
381 (u32) op->common.aml_opcode,
382 walk_state->op_info->name, op,
383 parser_state->aml,
384 op->common.aml_offset));
389 * Start arg_count at zero because we don't know if there are
390 * any args yet
392 walk_state->arg_count = 0;
394 /* Are there any arguments that must be processed? */
396 if (walk_state->arg_types) {
397 /* Get arguments */
399 switch (op->common.aml_opcode) {
400 case AML_BYTE_OP: /* AML_BYTEDATA_ARG */
401 case AML_WORD_OP: /* AML_WORDDATA_ARG */
402 case AML_DWORD_OP: /* AML_DWORDATA_ARG */
403 case AML_QWORD_OP: /* AML_QWORDATA_ARG */
404 case AML_STRING_OP: /* AML_ASCIICHARLIST_ARG */
406 /* Fill in constant or string argument directly */
408 acpi_ps_get_next_simple_arg(parser_state,
409 GET_CURRENT_ARG_TYPE
410 (walk_state->
411 arg_types), op);
412 break;
414 case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */
416 status =
417 acpi_ps_get_next_namepath(walk_state,
418 parser_state, op,
420 if (ACPI_FAILURE(status)) {
421 goto close_this_op;
424 walk_state->arg_types = 0;
425 break;
427 default:
429 * Op is not a constant or string, append each argument
430 * to the Op
432 while (GET_CURRENT_ARG_TYPE
433 (walk_state->arg_types)
434 && !walk_state->arg_count) {
435 walk_state->aml_offset = (u32)
436 ACPI_PTR_DIFF(parser_state->aml,
437 parser_state->
438 aml_start);
440 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)) {
448 goto close_this_op;
451 if (arg) {
452 arg->common.aml_offset =
453 walk_state->aml_offset;
454 acpi_ps_append_arg(op, arg);
456 INCREMENT_ARG_LIST(walk_state->
457 arg_types);
460 /* Special processing for certain opcodes */
462 /* TBD (remove): Temporary mechanism to disable this code if needed */
464 #ifdef ACPI_ENABLE_MODULE_LEVEL_CODE
466 if ((walk_state->pass_number <=
467 ACPI_IMODE_LOAD_PASS1)
469 ((walk_state->
470 parse_flags & ACPI_PARSE_DISASSEMBLE) ==
471 0)) {
473 * We want to skip If/Else/While constructs during Pass1
474 * because we want to actually conditionally execute the
475 * code during Pass2.
477 * Except for disassembly, where we always want to
478 * walk the If/Else/While packages
480 switch (op->common.aml_opcode) {
481 case AML_IF_OP:
482 case AML_ELSE_OP:
483 case AML_WHILE_OP:
485 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
486 "Pass1: Skipping an If/Else/While body\n"));
488 /* Skip body of if/else/while in pass 1 */
490 parser_state->aml =
491 parser_state->pkg_end;
492 walk_state->arg_count = 0;
493 break;
495 default:
496 break;
499 #endif
500 switch (op->common.aml_opcode) {
501 case AML_METHOD_OP:
504 * Skip parsing of control method
505 * because we don't have enough info in the first pass
506 * to parse it correctly.
508 * Save the length and address of the body
510 op->named.data = parser_state->aml;
511 op->named.length =
512 (u32) (parser_state->pkg_end -
513 parser_state->aml);
515 /* Skip body of method */
517 parser_state->aml =
518 parser_state->pkg_end;
519 walk_state->arg_count = 0;
520 break;
522 case AML_BUFFER_OP:
523 case AML_PACKAGE_OP:
524 case AML_VAR_PACKAGE_OP:
526 if ((op->common.parent) &&
527 (op->common.parent->common.
528 aml_opcode == AML_NAME_OP)
529 && (walk_state->pass_number <=
530 ACPI_IMODE_LOAD_PASS2)) {
532 * Skip parsing of Buffers and Packages
533 * because we don't have enough info in the first pass
534 * to parse them correctly.
536 op->named.data = aml_op_start;
537 op->named.length =
538 (u32) (parser_state->
539 pkg_end -
540 aml_op_start);
542 /* Skip body */
544 parser_state->aml =
545 parser_state->pkg_end;
546 walk_state->arg_count = 0;
548 break;
550 case AML_WHILE_OP:
552 if (walk_state->control_state) {
553 walk_state->control_state->
554 control.package_end =
555 parser_state->pkg_end;
557 break;
559 default:
561 /* No action for all other opcodes */
562 break;
564 break;
568 /* Check for arguments that need to be processed */
570 if (walk_state->arg_count) {
572 * There are arguments (complex ones), push Op and
573 * prepare for argument
575 status = acpi_ps_push_scope(parser_state, op,
576 walk_state->arg_types,
577 walk_state->arg_count);
578 if (ACPI_FAILURE(status)) {
579 goto close_this_op;
581 op = NULL;
582 continue;
586 * All arguments have been processed -- Op is complete,
587 * prepare for next
589 walk_state->op_info =
590 acpi_ps_get_opcode_info(op->common.aml_opcode);
591 if (walk_state->op_info->flags & AML_NAMED) {
592 if (acpi_gbl_depth) {
593 acpi_gbl_depth--;
596 if (op->common.aml_opcode == AML_REGION_OP) {
598 * Skip parsing of control method or opregion body,
599 * because we don't have enough info in the first pass
600 * to parse them correctly.
602 * Completed parsing an op_region declaration, we now
603 * know the length.
605 op->named.length =
606 (u32) (parser_state->aml - op->named.data);
610 if (walk_state->op_info->flags & AML_CREATE) {
612 * Backup to beginning of create_xXXfield declaration (1 for
613 * Opcode)
615 * body_length is unknown until we parse the body
617 op->named.length =
618 (u32) (parser_state->aml - op->named.data);
621 /* This op complete, notify the dispatcher */
623 if (walk_state->ascending_callback != NULL) {
624 walk_state->op = op;
625 walk_state->opcode = op->common.aml_opcode;
627 status = walk_state->ascending_callback(walk_state);
628 status =
629 acpi_ps_next_parse_state(walk_state, op, status);
630 if (status == AE_CTRL_PENDING) {
631 status = AE_OK;
632 goto close_this_op;
636 close_this_op:
638 * Finished one argument of the containing scope
640 parser_state->scope->parse_scope.arg_count--;
642 /* Finished with pre_op */
644 if (pre_op) {
645 acpi_ps_free_op(pre_op);
646 pre_op = NULL;
649 /* Close this Op (will result in parse subtree deletion) */
651 status2 = acpi_ps_complete_this_op(walk_state, op);
652 if (ACPI_FAILURE(status2)) {
653 return_ACPI_STATUS(status2);
655 op = NULL;
657 switch (status) {
658 case AE_OK:
659 break;
661 case AE_CTRL_TRANSFER:
663 /* We are about to transfer to a called method. */
665 walk_state->prev_op = op;
666 walk_state->prev_arg_types = walk_state->arg_types;
667 return_ACPI_STATUS(status);
669 case AE_CTRL_END:
671 acpi_ps_pop_scope(parser_state, &op,
672 &walk_state->arg_types,
673 &walk_state->arg_count);
675 if (op) {
676 walk_state->op = op;
677 walk_state->op_info =
678 acpi_ps_get_opcode_info(op->common.
679 aml_opcode);
680 walk_state->opcode = op->common.aml_opcode;
682 status =
683 walk_state->ascending_callback(walk_state);
684 status =
685 acpi_ps_next_parse_state(walk_state, op,
686 status);
688 status2 =
689 acpi_ps_complete_this_op(walk_state, op);
690 if (ACPI_FAILURE(status2)) {
691 return_ACPI_STATUS(status2);
693 op = NULL;
695 status = AE_OK;
696 break;
698 case AE_CTRL_BREAK:
699 case AE_CTRL_CONTINUE:
701 /* Pop off scopes until we find the While */
703 while (!op || (op->common.aml_opcode != AML_WHILE_OP)) {
704 acpi_ps_pop_scope(parser_state, &op,
705 &walk_state->arg_types,
706 &walk_state->arg_count);
709 /* Close this iteration of the While loop */
711 walk_state->op = op;
712 walk_state->op_info =
713 acpi_ps_get_opcode_info(op->common.aml_opcode);
714 walk_state->opcode = op->common.aml_opcode;
716 status = walk_state->ascending_callback(walk_state);
717 status =
718 acpi_ps_next_parse_state(walk_state, op, status);
720 status2 = acpi_ps_complete_this_op(walk_state, op);
721 if (ACPI_FAILURE(status2)) {
722 return_ACPI_STATUS(status2);
724 op = NULL;
726 status = AE_OK;
727 break;
729 case AE_CTRL_TERMINATE:
731 status = AE_OK;
733 /* Clean up */
734 do {
735 if (op) {
736 status2 =
737 acpi_ps_complete_this_op(walk_state,
738 op);
739 if (ACPI_FAILURE(status2)) {
740 return_ACPI_STATUS(status2);
743 acpi_ps_pop_scope(parser_state, &op,
744 &walk_state->arg_types,
745 &walk_state->arg_count);
747 } while (op);
749 return_ACPI_STATUS(status);
751 default: /* All other non-AE_OK status */
753 do {
754 if (op) {
755 status2 =
756 acpi_ps_complete_this_op(walk_state,
757 op);
758 if (ACPI_FAILURE(status2)) {
759 return_ACPI_STATUS(status2);
762 acpi_ps_pop_scope(parser_state, &op,
763 &walk_state->arg_types,
764 &walk_state->arg_count);
766 } while (op);
769 * TBD: Cleanup parse ops on error
771 #if 0
772 if (op == NULL) {
773 acpi_ps_pop_scope(parser_state, &op,
774 &walk_state->arg_types,
775 &walk_state->arg_count);
777 #endif
778 walk_state->prev_op = op;
779 walk_state->prev_arg_types = walk_state->arg_types;
780 return_ACPI_STATUS(status);
783 /* This scope complete? */
785 if (acpi_ps_has_completed_scope(parser_state)) {
786 acpi_ps_pop_scope(parser_state, &op,
787 &walk_state->arg_types,
788 &walk_state->arg_count);
789 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
790 "Popped scope, Op=%p\n", op));
791 } else {
792 op = NULL;
795 } /* while parser_state->Aml */
798 * Complete the last Op (if not completed), and clear the scope stack.
799 * It is easily possible to end an AML "package" with an unbounded number
800 * of open scopes (such as when several ASL blocks are closed with
801 * sequential closing braces). We want to terminate each one cleanly.
803 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "AML package complete at Op %p\n",
804 op));
805 do {
806 if (op) {
807 if (walk_state->ascending_callback != NULL) {
808 walk_state->op = op;
809 walk_state->op_info =
810 acpi_ps_get_opcode_info(op->common.
811 aml_opcode);
812 walk_state->opcode = op->common.aml_opcode;
814 status =
815 walk_state->ascending_callback(walk_state);
816 status =
817 acpi_ps_next_parse_state(walk_state, op,
818 status);
819 if (status == AE_CTRL_PENDING) {
820 status = AE_OK;
821 goto close_this_op;
824 if (status == AE_CTRL_TERMINATE) {
825 status = AE_OK;
827 /* Clean up */
828 do {
829 if (op) {
830 status2 =
831 acpi_ps_complete_this_op
832 (walk_state, op);
833 if (ACPI_FAILURE
834 (status2)) {
835 return_ACPI_STATUS
836 (status2);
840 acpi_ps_pop_scope(parser_state,
841 &op,
842 &walk_state->
843 arg_types,
844 &walk_state->
845 arg_count);
847 } while (op);
849 return_ACPI_STATUS(status);
852 else if (ACPI_FAILURE(status)) {
853 /* First error is most important */
855 (void)
856 acpi_ps_complete_this_op(walk_state,
857 op);
858 return_ACPI_STATUS(status);
862 status2 = acpi_ps_complete_this_op(walk_state, op);
863 if (ACPI_FAILURE(status2)) {
864 return_ACPI_STATUS(status2);
868 acpi_ps_pop_scope(parser_state, &op, &walk_state->arg_types,
869 &walk_state->arg_count);
871 } while (op);
873 return_ACPI_STATUS(status);