diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-10-19 10:25:32 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-22 02:05:05 +0200 |
commit | af08f9cc5073eee875016d28730c99ec86da4198 (patch) | |
tree | 8d63bdda3a08515e28bf74b6fc8a9979c807348b /drivers/acpi/acpica/dbinput.c | |
parent | 9957510255724c1c746c9a6264c849e9fdd4cd24 (diff) | |
download | talos-obmc-linux-af08f9cc5073eee875016d28730c99ec86da4198.tar.gz talos-obmc-linux-af08f9cc5073eee875016d28730c99ec86da4198.zip |
ACPICA: Debugger: Fix "quit/exit" command by cleaning up user commands termination logic
ACPICA commit 0dd68e16274cd38224aa4781eddc57dc2cbaa108
The quit/exit commands shouldn't invoke acpi_terminate_debugger() and
acpi_terminate() right in the user command loop, because when the debugger
exits, the kernel ACPI subsystem shouldn't be terminated (acpi_terminate())
and the debugger should only be terminated by its users
(acpi_terminate_debugger()) rather than being terminated itself. Leaving such
invocations causes kernel panic when the debugger is shipped in the Linux
kernel.
This patch fixes this issue. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/0dd68e16
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dbinput.c')
-rw-r--r-- | drivers/acpi/acpica/dbinput.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c index 7f1b6ec62668..f8cddd682af2 100644 --- a/drivers/acpi/acpica/dbinput.c +++ b/drivers/acpi/acpica/dbinput.c @@ -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); } @@ -1116,7 +1116,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: @@ -1166,6 +1166,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 +1213,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 +1262,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); } |