acpi_status acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node) { struct acpi_table_header *table; acpi_status status; acpi_owner_id owner_id; ACPI_FUNCTION_TRACE(tb_load_table); /* * Note: Now table is "INSTALLED", it must be validated before * using. */ status = acpi_get_table_by_index(table_index, &table); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } status = acpi_ns_load_table(table_index, parent_node); /* * This case handles the legacy option that groups all module-level * code blocks together and defers execution until all of the tables * are loaded. Execute all of these blocks at this time. * Execute any module-level code that was detected during the table * load phase. * * Note: this option is deprecated and will be eliminated in the * future. Use of this option can cause problems with AML code that * depends upon in-order immediate execution of module-level code. */ acpi_ns_exec_module_code_list(); /* * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is * responsible for discovering any new wake GPEs by running _PRW methods * that may have been loaded by this table. */ status = acpi_tb_get_owner_id(table_index, &owner_id); if (ACPI_SUCCESS(status)) { acpi_ev_update_gpes(owner_id); } /* Invoke table handler */ acpi_tb_notify_table(ACPI_TABLE_EVENT_LOAD, table); return_ACPI_STATUS(status); }
acpi_status acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node) { struct acpi_table_header *table; acpi_status status; acpi_owner_id owner_id; ACPI_FUNCTION_TRACE(tb_load_table); /* * Note: Now table is "INSTALLED", it must be validated before * using. */ status = acpi_get_table_by_index(table_index, &table); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } status = acpi_ns_load_table(table_index, parent_node); /* Execute any module-level code that was found in the table */ if (!acpi_gbl_parse_table_as_term_list && acpi_gbl_group_module_level_code) { acpi_ns_exec_module_code_list(); } /* * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is * responsible for discovering any new wake GPEs by running _PRW methods * that may have been loaded by this table. */ status = acpi_tb_get_owner_id(table_index, &owner_id); if (ACPI_SUCCESS(status)) { acpi_ev_update_gpes(owner_id); } /* Invoke table handler if present */ if (acpi_gbl_table_handler) { (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_LOAD, table, acpi_gbl_table_handler_context); } return_ACPI_STATUS(status); }