nsinit.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. /******************************************************************************
  2. *
  3. * Module Name: nsinit - namespace initialization
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2016, 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. #include <acpi/acpi.h>
  43. #include "accommon.h"
  44. #include "acnamesp.h"
  45. #include "acdispat.h"
  46. #include "acinterp.h"
  47. #include "acevents.h"
  48. #define _COMPONENT ACPI_NAMESPACE
  49. ACPI_MODULE_NAME("nsinit")
  50. /* Local prototypes */
  51. static acpi_status
  52. acpi_ns_init_one_object(acpi_handle obj_handle,
  53. u32 level, void *context, void **return_value);
  54. static acpi_status
  55. acpi_ns_init_one_device(acpi_handle obj_handle,
  56. u32 nesting_level, void *context, void **return_value);
  57. static acpi_status
  58. acpi_ns_find_ini_methods(acpi_handle obj_handle,
  59. u32 nesting_level, void *context, void **return_value);
  60. /*******************************************************************************
  61. *
  62. * FUNCTION: acpi_ns_initialize_objects
  63. *
  64. * PARAMETERS: None
  65. *
  66. * RETURN: Status
  67. *
  68. * DESCRIPTION: Walk the entire namespace and perform any necessary
  69. * initialization on the objects found therein
  70. *
  71. ******************************************************************************/
  72. acpi_status acpi_ns_initialize_objects(void)
  73. {
  74. acpi_status status;
  75. struct acpi_init_walk_info info;
  76. ACPI_FUNCTION_TRACE(ns_initialize_objects);
  77. ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
  78. "[Init] Completing Initialization of ACPI Objects\n"));
  79. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  80. "**** Starting initialization of namespace objects ****\n"));
  81. ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
  82. "Completing Region/Field/Buffer/Package initialization:\n"));
  83. /* Set all init info to zero */
  84. memset(&info, 0, sizeof(struct acpi_init_walk_info));
  85. /* Walk entire namespace from the supplied root */
  86. status = acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
  87. ACPI_UINT32_MAX, acpi_ns_init_one_object,
  88. NULL, &info, NULL);
  89. if (ACPI_FAILURE(status)) {
  90. ACPI_EXCEPTION((AE_INFO, status, "During WalkNamespace"));
  91. }
  92. ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
  93. " Initialized %u/%u Regions %u/%u Fields %u/%u "
  94. "Buffers %u/%u Packages (%u nodes)\n",
  95. info.op_region_init, info.op_region_count,
  96. info.field_init, info.field_count,
  97. info.buffer_init, info.buffer_count,
  98. info.package_init, info.package_count,
  99. info.object_count));
  100. ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
  101. "%u Control Methods found\n%u Op Regions found\n",
  102. info.method_count, info.op_region_count));
  103. return_ACPI_STATUS(AE_OK);
  104. }
  105. /*******************************************************************************
  106. *
  107. * FUNCTION: acpi_ns_initialize_devices
  108. *
  109. * PARAMETERS: None
  110. *
  111. * RETURN: acpi_status
  112. *
  113. * DESCRIPTION: Walk the entire namespace and initialize all ACPI devices.
  114. * This means running _INI on all present devices.
  115. *
  116. * Note: We install PCI config space handler on region access,
  117. * not here.
  118. *
  119. ******************************************************************************/
  120. acpi_status acpi_ns_initialize_devices(u32 flags)
  121. {
  122. acpi_status status = AE_OK;
  123. struct acpi_device_walk_info info;
  124. acpi_handle handle;
  125. ACPI_FUNCTION_TRACE(ns_initialize_devices);
  126. if (!(flags & ACPI_NO_DEVICE_INIT)) {
  127. ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
  128. "[Init] Initializing ACPI Devices\n"));
  129. /* Init counters */
  130. info.device_count = 0;
  131. info.num_STA = 0;
  132. info.num_INI = 0;
  133. ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
  134. "Initializing Device/Processor/Thermal objects "
  135. "and executing _INI/_STA methods:\n"));
  136. /* Tree analysis: find all subtrees that contain _INI methods */
  137. status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
  138. ACPI_UINT32_MAX, FALSE,
  139. acpi_ns_find_ini_methods, NULL,
  140. &info, NULL);
  141. if (ACPI_FAILURE(status)) {
  142. goto error_exit;
  143. }
  144. /* Allocate the evaluation information block */
  145. info.evaluate_info =
  146. ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
  147. if (!info.evaluate_info) {
  148. status = AE_NO_MEMORY;
  149. goto error_exit;
  150. }
  151. /*
  152. * Execute the "global" _INI method that may appear at the root.
  153. * This support is provided for Windows compatibility (Vista+) and
  154. * is not part of the ACPI specification.
  155. */
  156. info.evaluate_info->prefix_node = acpi_gbl_root_node;
  157. info.evaluate_info->relative_pathname = METHOD_NAME__INI;
  158. info.evaluate_info->parameters = NULL;
  159. info.evaluate_info->flags = ACPI_IGNORE_RETURN_VALUE;
  160. status = acpi_ns_evaluate(info.evaluate_info);
  161. if (ACPI_SUCCESS(status)) {
  162. info.num_INI++;
  163. }
  164. /*
  165. * Execute \_SB._INI.
  166. * There appears to be a strict order requirement for \_SB._INI,
  167. * which should be evaluated before any _REG evaluations.
  168. */
  169. status = acpi_get_handle(NULL, "\\_SB", &handle);
  170. if (ACPI_SUCCESS(status)) {
  171. memset(info.evaluate_info, 0,
  172. sizeof(struct acpi_evaluate_info));
  173. info.evaluate_info->prefix_node = handle;
  174. info.evaluate_info->relative_pathname =
  175. METHOD_NAME__INI;
  176. info.evaluate_info->parameters = NULL;
  177. info.evaluate_info->flags = ACPI_IGNORE_RETURN_VALUE;
  178. status = acpi_ns_evaluate(info.evaluate_info);
  179. if (ACPI_SUCCESS(status)) {
  180. info.num_INI++;
  181. }
  182. }
  183. }
  184. /*
  185. * Run all _REG methods
  186. *
  187. * Note: Any objects accessed by the _REG methods will be automatically
  188. * initialized, even if they contain executable AML (see the call to
  189. * acpi_ns_initialize_objects below).
  190. *
  191. * Note: According to the ACPI specification, we actually needn't execute
  192. * _REG for system_memory/system_io operation regions, but for PCI_Config
  193. * operation regions, it is required to evaluate _REG for those on a PCI
  194. * root bus that doesn't contain _BBN object. So this code is kept here
  195. * in order not to break things.
  196. */
  197. if (!(flags & ACPI_NO_ADDRESS_SPACE_INIT)) {
  198. ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
  199. "[Init] Executing _REG OpRegion methods\n"));
  200. status = acpi_ev_initialize_op_regions();
  201. if (ACPI_FAILURE(status)) {
  202. goto error_exit;
  203. }
  204. }
  205. if (!(flags & ACPI_NO_DEVICE_INIT)) {
  206. /* Walk namespace to execute all _INIs on present devices */
  207. status = acpi_ns_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
  208. ACPI_UINT32_MAX, FALSE,
  209. acpi_ns_init_one_device, NULL,
  210. &info, NULL);
  211. /*
  212. * Any _OSI requests should be completed by now. If the BIOS has
  213. * requested any Windows OSI strings, we will always truncate
  214. * I/O addresses to 16 bits -- for Windows compatibility.
  215. */
  216. if (acpi_gbl_osi_data >= ACPI_OSI_WIN_2000) {
  217. acpi_gbl_truncate_io_addresses = TRUE;
  218. }
  219. ACPI_FREE(info.evaluate_info);
  220. if (ACPI_FAILURE(status)) {
  221. goto error_exit;
  222. }
  223. ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
  224. " Executed %u _INI methods requiring %u _STA executions "
  225. "(examined %u objects)\n",
  226. info.num_INI, info.num_STA,
  227. info.device_count));
  228. }
  229. return_ACPI_STATUS(status);
  230. error_exit:
  231. ACPI_EXCEPTION((AE_INFO, status, "During device initialization"));
  232. return_ACPI_STATUS(status);
  233. }
  234. /*******************************************************************************
  235. *
  236. * FUNCTION: acpi_ns_init_one_object
  237. *
  238. * PARAMETERS: obj_handle - Node
  239. * level - Current nesting level
  240. * context - Points to a init info struct
  241. * return_value - Not used
  242. *
  243. * RETURN: Status
  244. *
  245. * DESCRIPTION: Callback from acpi_walk_namespace. Invoked for every object
  246. * within the namespace.
  247. *
  248. * Currently, the only objects that require initialization are:
  249. * 1) Methods
  250. * 2) Op Regions
  251. *
  252. ******************************************************************************/
  253. static acpi_status
  254. acpi_ns_init_one_object(acpi_handle obj_handle,
  255. u32 level, void *context, void **return_value)
  256. {
  257. acpi_object_type type;
  258. acpi_status status = AE_OK;
  259. struct acpi_init_walk_info *info =
  260. (struct acpi_init_walk_info *)context;
  261. struct acpi_namespace_node *node =
  262. (struct acpi_namespace_node *)obj_handle;
  263. union acpi_operand_object *obj_desc;
  264. ACPI_FUNCTION_NAME(ns_init_one_object);
  265. info->object_count++;
  266. /* And even then, we are only interested in a few object types */
  267. type = acpi_ns_get_type(obj_handle);
  268. obj_desc = acpi_ns_get_attached_object(node);
  269. if (!obj_desc) {
  270. return (AE_OK);
  271. }
  272. /* Increment counters for object types we are looking for */
  273. switch (type) {
  274. case ACPI_TYPE_REGION:
  275. info->op_region_count++;
  276. break;
  277. case ACPI_TYPE_BUFFER_FIELD:
  278. info->field_count++;
  279. break;
  280. case ACPI_TYPE_LOCAL_BANK_FIELD:
  281. info->field_count++;
  282. break;
  283. case ACPI_TYPE_BUFFER:
  284. info->buffer_count++;
  285. break;
  286. case ACPI_TYPE_PACKAGE:
  287. info->package_count++;
  288. break;
  289. default:
  290. /* No init required, just exit now */
  291. return (AE_OK);
  292. }
  293. /* If the object is already initialized, nothing else to do */
  294. if (obj_desc->common.flags & AOPOBJ_DATA_VALID) {
  295. return (AE_OK);
  296. }
  297. /* Must lock the interpreter before executing AML code */
  298. acpi_ex_enter_interpreter();
  299. /*
  300. * Each of these types can contain executable AML code within the
  301. * declaration.
  302. */
  303. switch (type) {
  304. case ACPI_TYPE_REGION:
  305. info->op_region_init++;
  306. status = acpi_ds_get_region_arguments(obj_desc);
  307. break;
  308. case ACPI_TYPE_BUFFER_FIELD:
  309. info->field_init++;
  310. status = acpi_ds_get_buffer_field_arguments(obj_desc);
  311. break;
  312. case ACPI_TYPE_LOCAL_BANK_FIELD:
  313. info->field_init++;
  314. status = acpi_ds_get_bank_field_arguments(obj_desc);
  315. break;
  316. case ACPI_TYPE_BUFFER:
  317. info->buffer_init++;
  318. status = acpi_ds_get_buffer_arguments(obj_desc);
  319. break;
  320. case ACPI_TYPE_PACKAGE:
  321. info->package_init++;
  322. status = acpi_ds_get_package_arguments(obj_desc);
  323. break;
  324. default:
  325. /* No other types can get here */
  326. break;
  327. }
  328. if (ACPI_FAILURE(status)) {
  329. ACPI_EXCEPTION((AE_INFO, status,
  330. "Could not execute arguments for [%4.4s] (%s)",
  331. acpi_ut_get_node_name(node),
  332. acpi_ut_get_type_name(type)));
  333. }
  334. /*
  335. * We ignore errors from above, and always return OK, since we don't want
  336. * to abort the walk on any single error.
  337. */
  338. acpi_ex_exit_interpreter();
  339. return (AE_OK);
  340. }
  341. /*******************************************************************************
  342. *
  343. * FUNCTION: acpi_ns_find_ini_methods
  344. *
  345. * PARAMETERS: acpi_walk_callback
  346. *
  347. * RETURN: acpi_status
  348. *
  349. * DESCRIPTION: Called during namespace walk. Finds objects named _INI under
  350. * device/processor/thermal objects, and marks the entire subtree
  351. * with a SUBTREE_HAS_INI flag. This flag is used during the
  352. * subsequent device initialization walk to avoid entire subtrees
  353. * that do not contain an _INI.
  354. *
  355. ******************************************************************************/
  356. static acpi_status
  357. acpi_ns_find_ini_methods(acpi_handle obj_handle,
  358. u32 nesting_level, void *context, void **return_value)
  359. {
  360. struct acpi_device_walk_info *info =
  361. ACPI_CAST_PTR(struct acpi_device_walk_info, context);
  362. struct acpi_namespace_node *node;
  363. struct acpi_namespace_node *parent_node;
  364. /* Keep count of device/processor/thermal objects */
  365. node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle);
  366. if ((node->type == ACPI_TYPE_DEVICE) ||
  367. (node->type == ACPI_TYPE_PROCESSOR) ||
  368. (node->type == ACPI_TYPE_THERMAL)) {
  369. info->device_count++;
  370. return (AE_OK);
  371. }
  372. /* We are only looking for methods named _INI */
  373. if (!ACPI_COMPARE_NAME(node->name.ascii, METHOD_NAME__INI)) {
  374. return (AE_OK);
  375. }
  376. /*
  377. * The only _INI methods that we care about are those that are
  378. * present under Device, Processor, and Thermal objects.
  379. */
  380. parent_node = node->parent;
  381. switch (parent_node->type) {
  382. case ACPI_TYPE_DEVICE:
  383. case ACPI_TYPE_PROCESSOR:
  384. case ACPI_TYPE_THERMAL:
  385. /* Mark parent and bubble up the INI present flag to the root */
  386. while (parent_node) {
  387. parent_node->flags |= ANOBJ_SUBTREE_HAS_INI;
  388. parent_node = parent_node->parent;
  389. }
  390. break;
  391. default:
  392. break;
  393. }
  394. return (AE_OK);
  395. }
  396. /*******************************************************************************
  397. *
  398. * FUNCTION: acpi_ns_init_one_device
  399. *
  400. * PARAMETERS: acpi_walk_callback
  401. *
  402. * RETURN: acpi_status
  403. *
  404. * DESCRIPTION: This is called once per device soon after ACPI is enabled
  405. * to initialize each device. It determines if the device is
  406. * present, and if so, calls _INI.
  407. *
  408. ******************************************************************************/
  409. static acpi_status
  410. acpi_ns_init_one_device(acpi_handle obj_handle,
  411. u32 nesting_level, void *context, void **return_value)
  412. {
  413. struct acpi_device_walk_info *walk_info =
  414. ACPI_CAST_PTR(struct acpi_device_walk_info, context);
  415. struct acpi_evaluate_info *info = walk_info->evaluate_info;
  416. u32 flags;
  417. acpi_status status;
  418. struct acpi_namespace_node *device_node;
  419. ACPI_FUNCTION_TRACE(ns_init_one_device);
  420. /* We are interested in Devices, Processors and thermal_zones only */
  421. device_node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle);
  422. if ((device_node->type != ACPI_TYPE_DEVICE) &&
  423. (device_node->type != ACPI_TYPE_PROCESSOR) &&
  424. (device_node->type != ACPI_TYPE_THERMAL)) {
  425. return_ACPI_STATUS(AE_OK);
  426. }
  427. /*
  428. * Because of an earlier namespace analysis, all subtrees that contain an
  429. * _INI method are tagged.
  430. *
  431. * If this device subtree does not contain any _INI methods, we
  432. * can exit now and stop traversing this entire subtree.
  433. */
  434. if (!(device_node->flags & ANOBJ_SUBTREE_HAS_INI)) {
  435. return_ACPI_STATUS(AE_CTRL_DEPTH);
  436. }
  437. /*
  438. * Run _STA to determine if this device is present and functioning. We
  439. * must know this information for two important reasons (from ACPI spec):
  440. *
  441. * 1) We can only run _INI if the device is present.
  442. * 2) We must abort the device tree walk on this subtree if the device is
  443. * not present and is not functional (we will not examine the children)
  444. *
  445. * The _STA method is not required to be present under the device, we
  446. * assume the device is present if _STA does not exist.
  447. */
  448. ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname
  449. (ACPI_TYPE_METHOD, device_node, METHOD_NAME__STA));
  450. status = acpi_ut_execute_STA(device_node, &flags);
  451. if (ACPI_FAILURE(status)) {
  452. /* Ignore error and move on to next device */
  453. return_ACPI_STATUS(AE_OK);
  454. }
  455. /*
  456. * Flags == -1 means that _STA was not found. In this case, we assume that
  457. * the device is both present and functional.
  458. *
  459. * From the ACPI spec, description of _STA:
  460. *
  461. * "If a device object (including the processor object) does not have an
  462. * _STA object, then OSPM assumes that all of the above bits are set (in
  463. * other words, the device is present, ..., and functioning)"
  464. */
  465. if (flags != ACPI_UINT32_MAX) {
  466. walk_info->num_STA++;
  467. }
  468. /*
  469. * Examine the PRESENT and FUNCTIONING status bits
  470. *
  471. * Note: ACPI spec does not seem to specify behavior for the present but
  472. * not functioning case, so we assume functioning if present.
  473. */
  474. if (!(flags & ACPI_STA_DEVICE_PRESENT)) {
  475. /* Device is not present, we must examine the Functioning bit */
  476. if (flags & ACPI_STA_DEVICE_FUNCTIONING) {
  477. /*
  478. * Device is not present but is "functioning". In this case,
  479. * we will not run _INI, but we continue to examine the children
  480. * of this device.
  481. *
  482. * From the ACPI spec, description of _STA: (note - no mention
  483. * of whether to run _INI or not on the device in question)
  484. *
  485. * "_STA may return bit 0 clear (not present) with bit 3 set
  486. * (device is functional). This case is used to indicate a valid
  487. * device for which no device driver should be loaded (for example,
  488. * a bridge device.) Children of this device may be present and
  489. * valid. OSPM should continue enumeration below a device whose
  490. * _STA returns this bit combination"
  491. */
  492. return_ACPI_STATUS(AE_OK);
  493. } else {
  494. /*
  495. * Device is not present and is not functioning. We must abort the
  496. * walk of this subtree immediately -- don't look at the children
  497. * of such a device.
  498. *
  499. * From the ACPI spec, description of _INI:
  500. *
  501. * "If the _STA method indicates that the device is not present,
  502. * OSPM will not run the _INI and will not examine the children
  503. * of the device for _INI methods"
  504. */
  505. return_ACPI_STATUS(AE_CTRL_DEPTH);
  506. }
  507. }
  508. /*
  509. * The device is present or is assumed present if no _STA exists.
  510. * Run the _INI if it exists (not required to exist)
  511. *
  512. * Note: We know there is an _INI within this subtree, but it may not be
  513. * under this particular device, it may be lower in the branch.
  514. */
  515. if (!ACPI_COMPARE_NAME(device_node->name.ascii, "_SB_") ||
  516. device_node->parent != acpi_gbl_root_node) {
  517. ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname
  518. (ACPI_TYPE_METHOD, device_node,
  519. METHOD_NAME__INI));
  520. memset(info, 0, sizeof(struct acpi_evaluate_info));
  521. info->prefix_node = device_node;
  522. info->relative_pathname = METHOD_NAME__INI;
  523. info->parameters = NULL;
  524. info->flags = ACPI_IGNORE_RETURN_VALUE;
  525. status = acpi_ns_evaluate(info);
  526. if (ACPI_SUCCESS(status)) {
  527. walk_info->num_INI++;
  528. }
  529. #ifdef ACPI_DEBUG_OUTPUT
  530. else if (status != AE_NOT_FOUND) {
  531. /* Ignore error and move on to next device */
  532. char *scope_name =
  533. acpi_ns_get_normalized_pathname(device_node, TRUE);
  534. ACPI_EXCEPTION((AE_INFO, status,
  535. "during %s._INI execution",
  536. scope_name));
  537. ACPI_FREE(scope_name);
  538. }
  539. #endif
  540. }
  541. /* Ignore errors from above */
  542. status = AE_OK;
  543. /*
  544. * The _INI method has been run if present; call the Global Initialization
  545. * Handler for this device.
  546. */
  547. if (acpi_gbl_init_handler) {
  548. status =
  549. acpi_gbl_init_handler(device_node, ACPI_INIT_DEVICE_INI);
  550. }
  551. return_ACPI_STATUS(status);
  552. }