aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2014-09-03 07:57:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-08 19:26:07 -0400
commit287f03c0d4fbf0b57f88867a02632376b63ef0c8 (patch)
treef7b352bf2f51e1b5710007e279cf35abe5a4da29
parenta5820c24a817e7bbebf5c4366989d5f243b809ab (diff)
serial: kgdb_nmi: No CON_ENABLED by default
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: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/kgdb_nmi.c5
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);
46 46
47static int kgdb_nmi_console_setup(struct console *co, char *options) 47static int kgdb_nmi_console_setup(struct console *co, char *options)
48{ 48{
49 arch_kgdb_ops.enable_nmi(1);
50
49 /* The NMI console uses the dbg_io_ops to issue console messages. To 51 /* The NMI console uses the dbg_io_ops to issue console messages. To
50 * avoid duplicate messages during kdb sessions we must inform kdb's 52 * avoid duplicate messages during kdb sessions we must inform kdb's
51 * I/O utilities that messages sent to the console will automatically 53 * I/O utilities that messages sent to the console will automatically
@@ -77,7 +79,7 @@ static struct console kgdb_nmi_console = {
77 .setup = kgdb_nmi_console_setup, 79 .setup = kgdb_nmi_console_setup,
78 .write = kgdb_nmi_console_write, 80 .write = kgdb_nmi_console_write,
79 .device = kgdb_nmi_console_device, 81 .device = kgdb_nmi_console_device,
80 .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_ENABLED, 82 .flags = CON_PRINTBUFFER | CON_ANYTIME,
81 .index = -1, 83 .index = -1,
82}; 84};
83 85
@@ -354,7 +356,6 @@ int kgdb_register_nmi_console(void)
354 } 356 }
355 357
356 register_console(&kgdb_nmi_console); 358 register_console(&kgdb_nmi_console);
357 arch_kgdb_ops.enable_nmi(1);
358 359
359 return 0; 360 return 0;
360err_drv_reg: 361err_drv_reg: