psparse.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  1. /******************************************************************************
  2. *
  3. * Module Name: psparse - Parser top level AML parse routines
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2017, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. /*
  43. * Parse the AML and build an operation tree as most interpreters,
  44. * like Perl, do. Parsing is done by hand rather than with a YACC
  45. * generated parser to tightly constrain stack and dynamic memory
  46. * usage. At the same time, parsing is kept flexible and the code
  47. * fairly compact by parsing based on a list of AML opcode
  48. * templates in aml_op_info[]
  49. */
  50. #include <acpi/acpi.h>
  51. #include "accommon.h"
  52. #include "acparser.h"
  53. #include "acdispat.h"
  54. #include "amlcode.h"
  55. #include "acinterp.h"
  56. #include "acnamesp.h"
  57. #define _COMPONENT ACPI_PARSER
  58. ACPI_MODULE_NAME("psparse")
  59. /*******************************************************************************
  60. *
  61. * FUNCTION: acpi_ps_get_opcode_size
  62. *
  63. * PARAMETERS: opcode - An AML opcode
  64. *
  65. * RETURN: Size of the opcode, in bytes (1 or 2)
  66. *
  67. * DESCRIPTION: Get the size of the current opcode.
  68. *
  69. ******************************************************************************/
  70. u32 acpi_ps_get_opcode_size(u32 opcode)
  71. {
  72. /* Extended (2-byte) opcode if > 255 */
  73. if (opcode > 0x00FF) {
  74. return (2);
  75. }
  76. /* Otherwise, just a single byte opcode */
  77. return (1);
  78. }
  79. /*******************************************************************************
  80. *
  81. * FUNCTION: acpi_ps_peek_opcode
  82. *
  83. * PARAMETERS: parser_state - A parser state object
  84. *
  85. * RETURN: Next AML opcode
  86. *
  87. * DESCRIPTION: Get next AML opcode (without incrementing AML pointer)
  88. *
  89. ******************************************************************************/
  90. u16 acpi_ps_peek_opcode(struct acpi_parse_state * parser_state)
  91. {
  92. u8 *aml;
  93. u16 opcode;
  94. aml = parser_state->aml;
  95. opcode = (u16) ACPI_GET8(aml);
  96. if (opcode == AML_EXTENDED_PREFIX) {
  97. /* Extended opcode, get the second opcode byte */
  98. aml++;
  99. opcode = (u16) ((opcode << 8) | ACPI_GET8(aml));
  100. }
  101. return (opcode);
  102. }
  103. /*******************************************************************************
  104. *
  105. * FUNCTION: acpi_ps_complete_this_op
  106. *
  107. * PARAMETERS: walk_state - Current State
  108. * op - Op to complete
  109. *
  110. * RETURN: Status
  111. *
  112. * DESCRIPTION: Perform any cleanup at the completion of an Op.
  113. *
  114. ******************************************************************************/
  115. acpi_status
  116. acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
  117. union acpi_parse_object *op)
  118. {
  119. union acpi_parse_object *prev;
  120. union acpi_parse_object *next;
  121. const struct acpi_opcode_info *parent_info;
  122. union acpi_parse_object *replacement_op = NULL;
  123. acpi_status status = AE_OK;
  124. ACPI_FUNCTION_TRACE_PTR(ps_complete_this_op, op);
  125. /* Check for null Op, can happen if AML code is corrupt */
  126. if (!op) {
  127. return_ACPI_STATUS(AE_OK); /* OK for now */
  128. }
  129. acpi_ex_stop_trace_opcode(op, walk_state);
  130. /* Delete this op and the subtree below it if asked to */
  131. if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) !=
  132. ACPI_PARSE_DELETE_TREE)
  133. || (walk_state->op_info->class == AML_CLASS_ARGUMENT)) {
  134. return_ACPI_STATUS(AE_OK);
  135. }
  136. /* Make sure that we only delete this subtree */
  137. if (op->common.parent) {
  138. prev = op->common.parent->common.value.arg;
  139. if (!prev) {
  140. /* Nothing more to do */
  141. goto cleanup;
  142. }
  143. /*
  144. * Check if we need to replace the operator and its subtree
  145. * with a return value op (placeholder op)
  146. */
  147. parent_info =
  148. acpi_ps_get_opcode_info(op->common.parent->common.
  149. aml_opcode);
  150. switch (parent_info->class) {
  151. case AML_CLASS_CONTROL:
  152. break;
  153. case AML_CLASS_CREATE:
  154. /*
  155. * These opcodes contain term_arg operands. The current
  156. * op must be replaced by a placeholder return op
  157. */
  158. replacement_op =
  159. acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP,
  160. op->common.aml);
  161. if (!replacement_op) {
  162. status = AE_NO_MEMORY;
  163. }
  164. break;
  165. case AML_CLASS_NAMED_OBJECT:
  166. /*
  167. * These opcodes contain term_arg operands. The current
  168. * op must be replaced by a placeholder return op
  169. */
  170. if ((op->common.parent->common.aml_opcode ==
  171. AML_REGION_OP)
  172. || (op->common.parent->common.aml_opcode ==
  173. AML_DATA_REGION_OP)
  174. || (op->common.parent->common.aml_opcode ==
  175. AML_BUFFER_OP)
  176. || (op->common.parent->common.aml_opcode ==
  177. AML_PACKAGE_OP)
  178. || (op->common.parent->common.aml_opcode ==
  179. AML_BANK_FIELD_OP)
  180. || (op->common.parent->common.aml_opcode ==
  181. AML_VARIABLE_PACKAGE_OP)) {
  182. replacement_op =
  183. acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP,
  184. op->common.aml);
  185. if (!replacement_op) {
  186. status = AE_NO_MEMORY;
  187. }
  188. } else
  189. if ((op->common.parent->common.aml_opcode ==
  190. AML_NAME_OP)
  191. && (walk_state->pass_number <=
  192. ACPI_IMODE_LOAD_PASS2)) {
  193. if ((op->common.aml_opcode == AML_BUFFER_OP)
  194. || (op->common.aml_opcode == AML_PACKAGE_OP)
  195. || (op->common.aml_opcode ==
  196. AML_VARIABLE_PACKAGE_OP)) {
  197. replacement_op =
  198. acpi_ps_alloc_op(op->common.
  199. aml_opcode,
  200. op->common.aml);
  201. if (!replacement_op) {
  202. status = AE_NO_MEMORY;
  203. } else {
  204. replacement_op->named.data =
  205. op->named.data;
  206. replacement_op->named.length =
  207. op->named.length;
  208. }
  209. }
  210. }
  211. break;
  212. default:
  213. replacement_op =
  214. acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP,
  215. op->common.aml);
  216. if (!replacement_op) {
  217. status = AE_NO_MEMORY;
  218. }
  219. }
  220. /* We must unlink this op from the parent tree */
  221. if (prev == op) {
  222. /* This op is the first in the list */
  223. if (replacement_op) {
  224. replacement_op->common.parent =
  225. op->common.parent;
  226. replacement_op->common.value.arg = NULL;
  227. replacement_op->common.node = op->common.node;
  228. op->common.parent->common.value.arg =
  229. replacement_op;
  230. replacement_op->common.next = op->common.next;
  231. } else {
  232. op->common.parent->common.value.arg =
  233. op->common.next;
  234. }
  235. }
  236. /* Search the parent list */
  237. else
  238. while (prev) {
  239. /* Traverse all siblings in the parent's argument list */
  240. next = prev->common.next;
  241. if (next == op) {
  242. if (replacement_op) {
  243. replacement_op->common.parent =
  244. op->common.parent;
  245. replacement_op->common.value.
  246. arg = NULL;
  247. replacement_op->common.node =
  248. op->common.node;
  249. prev->common.next =
  250. replacement_op;
  251. replacement_op->common.next =
  252. op->common.next;
  253. next = NULL;
  254. } else {
  255. prev->common.next =
  256. op->common.next;
  257. next = NULL;
  258. }
  259. }
  260. prev = next;
  261. }
  262. }
  263. cleanup:
  264. /* Now we can actually delete the subtree rooted at Op */
  265. acpi_ps_delete_parse_tree(op);
  266. return_ACPI_STATUS(status);
  267. }
  268. /*******************************************************************************
  269. *
  270. * FUNCTION: acpi_ps_next_parse_state
  271. *
  272. * PARAMETERS: walk_state - Current state
  273. * op - Current parse op
  274. * callback_status - Status from previous operation
  275. *
  276. * RETURN: Status
  277. *
  278. * DESCRIPTION: Update the parser state based upon the return exception from
  279. * the parser callback.
  280. *
  281. ******************************************************************************/
  282. acpi_status
  283. acpi_ps_next_parse_state(struct acpi_walk_state *walk_state,
  284. union acpi_parse_object *op,
  285. acpi_status callback_status)
  286. {
  287. struct acpi_parse_state *parser_state = &walk_state->parser_state;
  288. acpi_status status = AE_CTRL_PENDING;
  289. ACPI_FUNCTION_TRACE_PTR(ps_next_parse_state, op);
  290. switch (callback_status) {
  291. case AE_CTRL_TERMINATE:
  292. /*
  293. * A control method was terminated via a RETURN statement.
  294. * The walk of this method is complete.
  295. */
  296. parser_state->aml = parser_state->aml_end;
  297. status = AE_CTRL_TERMINATE;
  298. break;
  299. case AE_CTRL_BREAK:
  300. parser_state->aml = walk_state->aml_last_while;
  301. walk_state->control_state->common.value = FALSE;
  302. status = AE_CTRL_BREAK;
  303. break;
  304. case AE_CTRL_CONTINUE:
  305. parser_state->aml = walk_state->aml_last_while;
  306. status = AE_CTRL_CONTINUE;
  307. break;
  308. case AE_CTRL_PENDING:
  309. parser_state->aml = walk_state->aml_last_while;
  310. break;
  311. #if 0
  312. case AE_CTRL_SKIP:
  313. parser_state->aml = parser_state->scope->parse_scope.pkg_end;
  314. status = AE_OK;
  315. break;
  316. #endif
  317. case AE_CTRL_TRUE:
  318. /*
  319. * Predicate of an IF was true, and we are at the matching ELSE.
  320. * Just close out this package
  321. */
  322. parser_state->aml = acpi_ps_get_next_package_end(parser_state);
  323. status = AE_CTRL_PENDING;
  324. break;
  325. case AE_CTRL_FALSE:
  326. /*
  327. * Either an IF/WHILE Predicate was false or we encountered a BREAK
  328. * opcode. In both cases, we do not execute the rest of the
  329. * package; We simply close out the parent (finishing the walk of
  330. * this branch of the tree) and continue execution at the parent
  331. * level.
  332. */
  333. parser_state->aml = parser_state->scope->parse_scope.pkg_end;
  334. /* In the case of a BREAK, just force a predicate (if any) to FALSE */
  335. walk_state->control_state->common.value = FALSE;
  336. status = AE_CTRL_END;
  337. break;
  338. case AE_CTRL_TRANSFER:
  339. /* A method call (invocation) -- transfer control */
  340. status = AE_CTRL_TRANSFER;
  341. walk_state->prev_op = op;
  342. walk_state->method_call_op = op;
  343. walk_state->method_call_node =
  344. (op->common.value.arg)->common.node;
  345. /* Will return value (if any) be used by the caller? */
  346. walk_state->return_used =
  347. acpi_ds_is_result_used(op, walk_state);
  348. break;
  349. default:
  350. status = callback_status;
  351. if ((callback_status & AE_CODE_MASK) == AE_CODE_CONTROL) {
  352. status = AE_OK;
  353. }
  354. break;
  355. }
  356. return_ACPI_STATUS(status);
  357. }
  358. /*******************************************************************************
  359. *
  360. * FUNCTION: acpi_ps_parse_aml
  361. *
  362. * PARAMETERS: walk_state - Current state
  363. *
  364. *
  365. * RETURN: Status
  366. *
  367. * DESCRIPTION: Parse raw AML and return a tree of ops
  368. *
  369. ******************************************************************************/
  370. acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
  371. {
  372. acpi_status status;
  373. struct acpi_thread_state *thread;
  374. struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list;
  375. struct acpi_walk_state *previous_walk_state;
  376. ACPI_FUNCTION_TRACE(ps_parse_aml);
  377. ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
  378. "Entered with WalkState=%p Aml=%p size=%X\n",
  379. walk_state, walk_state->parser_state.aml,
  380. walk_state->parser_state.aml_size));
  381. if (!walk_state->parser_state.aml) {
  382. return_ACPI_STATUS(AE_NULL_OBJECT);
  383. }
  384. /* Create and initialize a new thread state */
  385. thread = acpi_ut_create_thread_state();
  386. if (!thread) {
  387. if (walk_state->method_desc) {
  388. /* Executing a control method - additional cleanup */
  389. acpi_ds_terminate_control_method(walk_state->
  390. method_desc,
  391. walk_state);
  392. }
  393. acpi_ds_delete_walk_state(walk_state);
  394. return_ACPI_STATUS(AE_NO_MEMORY);
  395. }
  396. walk_state->thread = thread;
  397. /*
  398. * If executing a method, the starting sync_level is this method's
  399. * sync_level
  400. */
  401. if (walk_state->method_desc) {
  402. walk_state->thread->current_sync_level =
  403. walk_state->method_desc->method.sync_level;
  404. }
  405. acpi_ds_push_walk_state(walk_state, thread);
  406. /*
  407. * This global allows the AML debugger to get a handle to the currently
  408. * executing control method.
  409. */
  410. acpi_gbl_current_walk_list = thread;
  411. /*
  412. * Execute the walk loop as long as there is a valid Walk State. This
  413. * handles nested control method invocations without recursion.
  414. */
  415. ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "State=%p\n", walk_state));
  416. status = AE_OK;
  417. while (walk_state) {
  418. if (ACPI_SUCCESS(status)) {
  419. /*
  420. * The parse_loop executes AML until the method terminates
  421. * or calls another method.
  422. */
  423. status = acpi_ps_parse_loop(walk_state);
  424. }
  425. ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
  426. "Completed one call to walk loop, %s State=%p\n",
  427. acpi_format_exception(status), walk_state));
  428. if (status == AE_CTRL_TRANSFER) {
  429. /*
  430. * A method call was detected.
  431. * Transfer control to the called control method
  432. */
  433. status =
  434. acpi_ds_call_control_method(thread, walk_state,
  435. NULL);
  436. if (ACPI_FAILURE(status)) {
  437. status =
  438. acpi_ds_method_error(status, walk_state);
  439. }
  440. /*
  441. * If the transfer to the new method method call worked
  442. *, a new walk state was created -- get it
  443. */
  444. walk_state = acpi_ds_get_current_walk_state(thread);
  445. continue;
  446. } else if (status == AE_CTRL_TERMINATE) {
  447. status = AE_OK;
  448. } else if ((status != AE_OK) && (walk_state->method_desc)) {
  449. /* Either the method parse or actual execution failed */
  450. acpi_ex_exit_interpreter();
  451. if (status == AE_ABORT_METHOD) {
  452. acpi_ns_print_node_pathname(walk_state->
  453. method_node,
  454. "Method aborted:");
  455. acpi_os_printf("\n");
  456. } else {
  457. ACPI_ERROR_METHOD
  458. ("Method parse/execution failed",
  459. walk_state->method_node, NULL, status);
  460. }
  461. acpi_ex_enter_interpreter();
  462. /* Check for possible multi-thread reentrancy problem */
  463. if ((status == AE_ALREADY_EXISTS) &&
  464. (!(walk_state->method_desc->method.info_flags &
  465. ACPI_METHOD_SERIALIZED))) {
  466. /*
  467. * Method is not serialized and tried to create an object
  468. * twice. The probable cause is that the method cannot
  469. * handle reentrancy. Mark as "pending serialized" now, and
  470. * then mark "serialized" when the last thread exits.
  471. */
  472. walk_state->method_desc->method.info_flags |=
  473. ACPI_METHOD_SERIALIZED_PENDING;
  474. }
  475. }
  476. /* We are done with this walk, move on to the parent if any */
  477. walk_state = acpi_ds_pop_walk_state(thread);
  478. /* Reset the current scope to the beginning of scope stack */
  479. acpi_ds_scope_stack_clear(walk_state);
  480. /*
  481. * If we just returned from the execution of a control method or if we
  482. * encountered an error during the method parse phase, there's lots of
  483. * cleanup to do
  484. */
  485. if (((walk_state->parse_flags & ACPI_PARSE_MODE_MASK) ==
  486. ACPI_PARSE_EXECUTE &&
  487. !(walk_state->parse_flags & ACPI_PARSE_MODULE_LEVEL)) ||
  488. (ACPI_FAILURE(status))) {
  489. acpi_ds_terminate_control_method(walk_state->
  490. method_desc,
  491. walk_state);
  492. }
  493. /* Delete this walk state and all linked control states */
  494. acpi_ps_cleanup_scope(&walk_state->parser_state);
  495. previous_walk_state = walk_state;
  496. ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
  497. "ReturnValue=%p, ImplicitValue=%p State=%p\n",
  498. walk_state->return_desc,
  499. walk_state->implicit_return_obj, walk_state));
  500. /* Check if we have restarted a preempted walk */
  501. walk_state = acpi_ds_get_current_walk_state(thread);
  502. if (walk_state) {
  503. if (ACPI_SUCCESS(status)) {
  504. /*
  505. * There is another walk state, restart it.
  506. * If the method return value is not used by the parent,
  507. * The object is deleted
  508. */
  509. if (!previous_walk_state->return_desc) {
  510. /*
  511. * In slack mode execution, if there is no return value
  512. * we should implicitly return zero (0) as a default value.
  513. */
  514. if (acpi_gbl_enable_interpreter_slack &&
  515. !previous_walk_state->
  516. implicit_return_obj) {
  517. previous_walk_state->
  518. implicit_return_obj =
  519. acpi_ut_create_integer_object
  520. ((u64) 0);
  521. if (!previous_walk_state->
  522. implicit_return_obj) {
  523. return_ACPI_STATUS
  524. (AE_NO_MEMORY);
  525. }
  526. }
  527. /* Restart the calling control method */
  528. status =
  529. acpi_ds_restart_control_method
  530. (walk_state,
  531. previous_walk_state->
  532. implicit_return_obj);
  533. } else {
  534. /*
  535. * We have a valid return value, delete any implicit
  536. * return value.
  537. */
  538. acpi_ds_clear_implicit_return
  539. (previous_walk_state);
  540. status =
  541. acpi_ds_restart_control_method
  542. (walk_state,
  543. previous_walk_state->return_desc);
  544. }
  545. if (ACPI_SUCCESS(status)) {
  546. walk_state->walk_type |=
  547. ACPI_WALK_METHOD_RESTART;
  548. }
  549. } else {
  550. /* On error, delete any return object or implicit return */
  551. acpi_ut_remove_reference(previous_walk_state->
  552. return_desc);
  553. acpi_ds_clear_implicit_return
  554. (previous_walk_state);
  555. }
  556. }
  557. /*
  558. * Just completed a 1st-level method, save the final internal return
  559. * value (if any)
  560. */
  561. else if (previous_walk_state->caller_return_desc) {
  562. if (previous_walk_state->implicit_return_obj) {
  563. *(previous_walk_state->caller_return_desc) =
  564. previous_walk_state->implicit_return_obj;
  565. } else {
  566. /* NULL if no return value */
  567. *(previous_walk_state->caller_return_desc) =
  568. previous_walk_state->return_desc;
  569. }
  570. } else {
  571. if (previous_walk_state->return_desc) {
  572. /* Caller doesn't want it, must delete it */
  573. acpi_ut_remove_reference(previous_walk_state->
  574. return_desc);
  575. }
  576. if (previous_walk_state->implicit_return_obj) {
  577. /* Caller doesn't want it, must delete it */
  578. acpi_ut_remove_reference(previous_walk_state->
  579. implicit_return_obj);
  580. }
  581. }
  582. acpi_ds_delete_walk_state(previous_walk_state);
  583. }
  584. /* Normal exit */
  585. acpi_ex_release_all_mutexes(thread);
  586. acpi_ut_delete_generic_state(ACPI_CAST_PTR
  587. (union acpi_generic_state, thread));
  588. acpi_gbl_current_walk_list = prev_walk_list;
  589. return_ACPI_STATUS(status);
  590. }