Fugang Duan e67c139c48 tty: serial: imx: keep console clocks always on
For below code, there has chance to cause deadlock in SMP system:
Thread 1:
clk_enable_lock();
pr_info("debug message");
clk_enable_unlock();

Thread 2:
imx_uart_console_write()
	clk_enable()
		clk_enable_lock();

Thread 1:
Acuired clk enable_lock -> printk -> console_trylock_spinning
Thread 2:
console_unlock() -> imx_uart_console_write -> clk_disable -> Acquite clk enable_lock

So the patch is to keep console port clocks always on like
other console drivers.

Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check")
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Link: https://lore.kernel.org/r/20201111025136.29818-1-fugang.duan@nxp.com
Cc: stable <stable@vger.kernel.org>
[fix up build warning - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-12 09:39:53 +01:00
..
2020-11-08 11:28:08 -08:00
2020-08-31 07:19:25 +02:00
2020-08-31 07:19:25 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00
2020-08-18 13:51:18 +02:00