diff options
author | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-07-23 21:44:19 +0000 |
---|---|---|
committer | Jessica Clarke <jrtc27@FreeBSD.org> | 2022-07-23 21:44:19 +0000 |
commit | 17a4a163df85e2cbe20e4fbdb03c56085e8079e6 (patch) | |
tree | 974214db32afd06d98151e1818f23fefae2bb0d4 /sys/sys | |
parent | 8c9aa94b42bfe58f46be862ad5a08a68d9a19a4a (diff) | |
download | src-17a4a163df85e2cbe20e4fbdb03c56085e8079e6.tar.gz src-17a4a163df85e2cbe20e4fbdb03c56085e8079e6.zip |
Revert "Fill in cn_name in struct consdev."
This reverts commit 82a21151cf1d7a3e9e95b9edbbf74ac10f386d6a.
This commit was made to aid debugging before consoles are initialised so
that they can more easily be identified from a debugger. However,
various consoles (cfecons, ofwcons, mambocons and rcons) all check
whether cn_name[0] is non-zero to see they are attached or not, and so
this breaks that (perhaps misguided) approach. On RISC-V this results in
rcons (the SBI firmware console driver) racing with the real UART driver
and so input gets probabilistically lost on the real UART (around 2/3 of
the time for me on QEMU).
Moreover, the name given to CONSOLE_DRIVER isn't necessarily the same as
what eventually gets written to cn_name, such as cfecons vs cfe, rcons
vs riscv, ttyj0 vs aju, ttyv0 vs sc, ttyuN vs uart_phyp/opal and all
manner of things vs ucom, so in some cases this is in fact misleading as
the name will change after attaching.
Discussed with: cperciva
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/cons.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/sys/cons.h b/sys/sys/cons.h index fec7f6c01b84..ad73b258df6d 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -104,7 +104,6 @@ extern struct tty *constty; /* Temporary virtual console. */ static struct consdev name = { \ .cn_ops = &ops, \ .cn_arg = (arg), \ - .cn_name = #name, \ }; \ DATA_SET(cons_set, name) |