Re: [PATCH v1 -next] tty: serial: add panic serial helper
From: Randy Dunlap
Date: Thu Jun 01 2023 - 19:14:16 EST
Hi--
On 5/31/23 01:17, Hongyu Xie wrote:
> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> index 3e3fb377d90d..70d0d2e4b827 100644
> --- a/drivers/tty/serial/Kconfig
> +++ b/drivers/tty/serial/Kconfig
> @@ -198,6 +198,31 @@ config SERIAL_KGDB_NMI
>
> If unsure, say N.
>
> +config PANIC_SERIAL_HELPER
> + tristate "debug through uart after panic"
UART
> + depends on PANIC_TIMEOUT=0
> + select CONSOLE_POLL
> + help
> + This is a debug module that allows you to get all kernel logs
> + after panic.
> +
> + Normally you need to attach a USB-to-UART tool or enable kdump
> + before panic happens to get log from kernel after panic. If you
> + didn't do that and kdump is not working, you can't get any log to
> + know what happened before panic. If you have a USB-to-UART tool
> + and the uart port on your computer is working, this module helps
UART
> + you to get all kernel log after panic() is called.
> +
> + This module uses serial port in poll mode, so it's more stable
> + than other debugging methods.
> +
> + Read <file:Documentation/dev-tools/panic_serial_helper.rst> for
> + usage.
> +
> + Say Y if you have an UART port that is working. If unsure, say N.
> + Say M if you want add this as a module driver.
> + The module will be called panic_serial_helper.
thanks.
--
~Randy