Re: [PATCH V2 1/2] tty: serial: imx: add lock for registers save/restore
From: Uwe Kleine-König <hidden>
Date: 2018-09-05 05:54:35
Also in:
lkml
From: Uwe Kleine-König <hidden>
Date: 2018-09-05 05:54:35
Also in:
lkml
Hello, On Wed, Sep 05, 2018 at 09:24:26AM +0800, Anson Huang wrote:
In noirq suspend/resume stage with no_console_suspend enabled, imx_uart_console_write() may be called to print out log_buf message by printk(), so there will be race condition between imx_uart_console_write() and imx_uart_save/restore_context(), need to add lock to protect the registers save/restore operations. Signed-off-by: Anson Huang <redacted> --- drivers/tty/serial/imx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 239c0fa..c15332d 100644
Acked-by: Uwe Kleine-König <redacted> Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |