aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utxface.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utxface.c')
-rw-r--r--drivers/acpi/acpica/utxface.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 078a22728c6b..b1f5f680bc78 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -251,6 +251,16 @@ acpi_status acpi_initialize_objects(u32 flags)
251 } 251 }
252 252
253 /* 253 /*
254 * Execute any module-level code that was detected during the table load
255 * phase. Although illegal since ACPI 2.0, there are many machines that
256 * contain this type of code. Each block of detected executable AML code
257 * outside of any control method is wrapped with a temporary control
258 * method object and placed on a global list. The methods on this list
259 * are executed below.
260 */
261 acpi_ns_exec_module_code_list();
262
263 /*
254 * Initialize the objects that remain uninitialized. This runs the 264 * Initialize the objects that remain uninitialized. This runs the
255 * executable AML that may be part of the declaration of these objects: 265 * executable AML that may be part of the declaration of these objects:
256 * operation_regions, buffer_fields, Buffers, and Packages. 266 * operation_regions, buffer_fields, Buffers, and Packages.
@@ -318,7 +328,7 @@ ACPI_EXPORT_SYMBOL(acpi_initialize_objects)
318 * 328 *
319 * RETURN: Status 329 * RETURN: Status
320 * 330 *
321 * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. 331 * DESCRIPTION: Shutdown the ACPICA subsystem and release all resources.
322 * 332 *
323 ******************************************************************************/ 333 ******************************************************************************/
324acpi_status acpi_terminate(void) 334acpi_status acpi_terminate(void)
@@ -327,6 +337,19 @@ acpi_status acpi_terminate(void)
327 337
328 ACPI_FUNCTION_TRACE(acpi_terminate); 338 ACPI_FUNCTION_TRACE(acpi_terminate);
329 339
340 /* Just exit if subsystem is already shutdown */
341
342 if (acpi_gbl_shutdown) {
343 ACPI_ERROR((AE_INFO, "ACPI Subsystem is already terminated"));
344 return_ACPI_STATUS(AE_OK);
345 }
346
347 /* Subsystem appears active, go ahead and shut it down */
348
349 acpi_gbl_shutdown = TRUE;
350 acpi_gbl_startup_flags = 0;
351 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n"));
352
330 /* Terminate the AML Debugger if present */ 353 /* Terminate the AML Debugger if present */
331 354
332 ACPI_DEBUGGER_EXEC(acpi_gbl_db_terminate_threads = TRUE); 355 ACPI_DEBUGGER_EXEC(acpi_gbl_db_terminate_threads = TRUE);
@@ -353,6 +376,7 @@ acpi_status acpi_terminate(void)
353} 376}
354 377
355ACPI_EXPORT_SYMBOL(acpi_terminate) 378ACPI_EXPORT_SYMBOL(acpi_terminate)
379
356#ifndef ACPI_ASL_COMPILER 380#ifndef ACPI_ASL_COMPILER
357#ifdef ACPI_FUTURE_USAGE 381#ifdef ACPI_FUTURE_USAGE
358/******************************************************************************* 382/*******************************************************************************