nsinit.c 19 KB

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