Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Thompson and committed by
Greg Kroah-Hartman
287f03c0 a5820c24

+3 -2
+3 -2
drivers/tty/serial/kgdb_nmi.c
··· 46 46 47 47 static int kgdb_nmi_console_setup(struct console *co, char *options) 48 48 { 49 + arch_kgdb_ops.enable_nmi(1); 50 + 49 51 /* The NMI console uses the dbg_io_ops to issue console messages. To 50 52 * avoid duplicate messages during kdb sessions we must inform kdb's 51 53 * I/O utilities that messages sent to the console will automatically ··· 79 77 .setup = kgdb_nmi_console_setup, 80 78 .write = kgdb_nmi_console_write, 81 79 .device = kgdb_nmi_console_device, 82 - .flags = CON_PRINTBUFFER | CON_ANYTIME | CON_ENABLED, 80 + .flags = CON_PRINTBUFFER | CON_ANYTIME, 83 81 .index = -1, 84 82 }; 85 83 ··· 356 354 } 357 355 358 356 register_console(&kgdb_nmi_console); 359 - arch_kgdb_ops.enable_nmi(1); 360 357 361 358 return 0; 362 359 err_drv_reg: