diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2014-08-19 12:14:59 +0100 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2014-09-03 12:57:13 +0100 |
commit | 7154d8901abe487d786c5972ca868e958ff7d23e (patch) | |
tree | a70a423ff89ae9dedf6abf9fa7f4e02d8407e9e9 | |
parent | 8d656f055800a15a6723af1f4782d93180d40350 (diff) | |
download | linux-dev/kgdb_nmi-no_con_enabled.tar.gz |
serial: kgdb_nmi: No CON_ENABLED by defaultdev/kgdb_nmi-no_con_enabled
At present this console is optionally registered by NULL checking
arch_kgdb_ops.enable_nmi. In practice this requires the architecture
dependant code to implement some kind of control (e.g. module arguments)
to enable/disable this feature.
The kernel already provides us the perfectly adequate console= argument
to enable/disable consoles. Let's use that instead!
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: linux-serial@vger.kernel.org
-rw-r--r-- | drivers/tty/serial/kgdb_nmi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c index 6ec7501b464d..129dc5be6028 100644 --- a/drivers/tty/serial/kgdb_nmi.c +++ b/drivers/tty/serial/kgdb_nmi.c @@ -46,6 +46,8 @@ static atomic_t kgdb_nmi_num_readers = ATOMIC_INIT(0); static int kgdb_nmi_console_setup(struct console *co, char *options) { + arch_kgdb_ops.enable_nmi(1); + /* The NMI console uses the dbg_io_ops to issue console messages. To * avoid duplicate messages during kdb sessions we must inform kdb's * I/O utilities that messages sent to the console will automatically @@ -77,7 +79,7 @@ static struct console kgdb_nmi_console = { .setup = kgdb_nmi_console_setup, .write = kgdb_nmi_console_write, .device = kgdb_nmi_console_device, - .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_ENABLED, + .flags = CON_PRINTBUFFER | CON_ANYTIME, .index = -1, }; @@ -354,7 +356,6 @@ int kgdb_register_nmi_console(void) } register_console(&kgdb_nmi_console); - arch_kgdb_ops.enable_nmi(1); return 0; err_drv_reg: |