]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/acpi/acpica/dbinput.c
Merge remote-tracking branch 'usb-chipidea-next/ci-for-usb-next'
[karo-tx-linux.git] / drivers / acpi / acpica / dbinput.c
index 7f1b6ec6266805dc1d9245219372417240c395c8..0480254437f1a30be42b91a920735b18d2b28f95 100644 (file)
@@ -694,7 +694,7 @@ acpi_db_command_dispatch(char *input_buffer,
 
        /* If acpi_terminate has been called, terminate this thread */
 
-       if (acpi_gbl_db_terminate_threads) {
+       if (acpi_gbl_db_terminate_loop) {
                return (AE_CTRL_TERMINATE);
        }
 
@@ -1074,6 +1074,7 @@ acpi_db_command_dispatch(char *input_buffer,
                 * re-creating the semaphores!
                 */
 
+               acpi_gbl_db_terminate_loop = TRUE;
                /*  acpi_initialize (NULL); */
                break;
 
@@ -1116,7 +1117,7 @@ acpi_db_command_dispatch(char *input_buffer,
 #ifdef ACPI_APPLICATION
                acpi_db_close_debug_file();
 #endif
-               acpi_gbl_db_terminate_threads = TRUE;
+               acpi_gbl_db_terminate_loop = TRUE;
                return (AE_CTRL_TERMINATE);
 
        case CMD_NOT_FOUND:
@@ -1151,7 +1152,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context)
        acpi_status status = AE_OK;
        acpi_status Mstatus;
 
-       while (status != AE_CTRL_TERMINATE) {
+       while (status != AE_CTRL_TERMINATE && !acpi_gbl_db_terminate_loop) {
                acpi_gbl_method_executing = FALSE;
                acpi_gbl_step_to_next_call = FALSE;
 
@@ -1166,6 +1167,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context)
 
                acpi_os_release_mutex(acpi_gbl_db_command_complete);
        }
+       acpi_gbl_db_threads_terminated = TRUE;
 }
 
 /*******************************************************************************
@@ -1212,7 +1214,7 @@ acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op)
 
        /* TBD: [Restructure] Need a separate command line buffer for step mode */
 
-       while (!acpi_gbl_db_terminate_threads) {
+       while (!acpi_gbl_db_terminate_loop) {
 
                /* Force output to console until a command is entered */
 
@@ -1261,14 +1263,5 @@ acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op)
                }
        }
 
-       /* Shut down the debugger */
-
-       acpi_terminate_debugger();
-
-       /*
-        * Only this thread (the original thread) should actually terminate the
-        * subsystem, because all the semaphores are deleted during termination
-        */
-       status = acpi_terminate();
        return (status);
 }