diff options
author | Douglas Anderson <dianders@chromium.org> | 2023-03-16 13:20:57 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-29 10:51:52 +0200 |
commit | d8851a96ba25d5fa2a3d89550f8333db5b694919 (patch) | |
tree | 8fbe8918236c4734cebaade105d7239a5946a8a7 /drivers/tty | |
parent | 5e227ef2aa388f14ceeafa65eb8a38fa37918eb4 (diff) | |
download | lwn-d8851a96ba25d5fa2a3d89550f8333db5b694919.tar.gz lwn-d8851a96ba25d5fa2a3d89550f8333db5b694919.zip |
tty: serial: qcom-geni-serial: Add a poll_init() function
On sc7180 Chromebooks, I did the following:
* Didn't enable earlycon in the kernel command line.
* Didn't enable serial console in the kernel command line.
* Didn't enable an agetty or any other client of "/dev/ttyMSM0".
* Added "kgdboc=ttyMSM0" to the kernel command line.
After I did that, I tried to enter kdb with this command over an ssh
session:
echo g > /proc/sysrq-trigger
When I did that the system just hung.
Although I thought I'd tested this scenario before, I couldn't go back
and find a time when it was working. Previous testing must have relied
on either the UART acting as the kernel console or an agetty running.
It turns out to be pretty easy to fix: we can just use
qcom_geni_serial_port_setup() as the .poll_init() function. This,
together with the patch ("serial: uart_poll_init() should power on the
UART"), allows the debugger to work even if there are no other users
of the serial port.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230316132027.RESEND.2.Ie678853bb101091afe78cc8c22344bf3ff3aed74@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/qcom_geni_serial.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 28fbc927a546..1881dd5b3c4d 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -1535,6 +1535,7 @@ static const struct uart_ops qcom_geni_console_pops = { #ifdef CONFIG_CONSOLE_POLL .poll_get_char = qcom_geni_serial_get_char, .poll_put_char = qcom_geni_serial_poll_put_char, + .poll_init = qcom_geni_serial_port_setup, #endif .pm = qcom_geni_serial_pm, }; |