c8b29f049e
At present it is not possible to boot with the ttyNMI0 console treating character input normally, instead character input triggers a prompt telling the user how to trigger the knock detector and enter the debugger. To use the console normally requires that kdb be entered and the nmi_console command be used to enable the console (or if only kgdb is present then gdb must directly manipulate the value of kgdb_nmi_tty_enabled). This patch automates the management of kgdb_nmi_tty_enabled by keeping track of the number of file handles that are open for reading and using that to determine how to tty should operate. The approach means that: 1. Behaviour before init starts is unchanged. 2. If the userspace runs a getty or some other interactive process on /dev/console (or explicitly on /dev/ttyNMI0) the tty will treat character input like any other tty. 3. If the userspace doesn't use /dev/console or if it uses /dev/console only to log messages (O_WRONLY) then the user prompt is retained. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Cc: Jason Wessel <jason.wessel@windriver.com> Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
hvc | ||
ipwireless | ||
serial | ||
vt | ||
amiserial.c | ||
bfin_jtag_comm.c | ||
cyclades.c | ||
ehv_bytechan.c | ||
goldfish.c | ||
isicom.c | ||
Kconfig | ||
Makefile | ||
metag_da.c | ||
moxa.c | ||
moxa.h | ||
mxser.c | ||
mxser.h | ||
n_gsm.c | ||
n_hdlc.c | ||
n_r3964.c | ||
n_tracerouter.c | ||
n_tracesink.c | ||
n_tracesink.h | ||
n_tty.c | ||
nozomi.c | ||
pty.c | ||
rocket.c | ||
rocket.h | ||
rocket_int.h | ||
synclink.c | ||
synclink_gt.c | ||
synclinkmp.c | ||
sysrq.c | ||
tty_audit.c | ||
tty_buffer.c | ||
tty_io.c | ||
tty_ioctl.c | ||
tty_ldisc.c | ||
tty_ldsem.c | ||
tty_mutex.c | ||
tty_port.c |