Fugang Duan
5f34104d15
tty: serial: imx: keep console clocks always on
...
commit e67c139c488e84e7eae6c333231e791f0e89b3fb upstream.
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-24 13:03:06 +01:00
..
2020-10-29 09:05:35 +01:00
2020-10-29 09:05:45 +01:00
2020-11-24 13:03:06 +01:00
2020-11-10 10:24:03 +01:00
2020-04-24 07:59:15 +02:00
2019-04-17 08:36:44 +02:00
2020-06-30 15:38:26 -04:00
2019-12-21 10:41:25 +01:00
2019-12-21 10:41:25 +01:00
2019-12-21 10:41:25 +01:00
2020-10-29 09:05:35 +01:00
2020-05-02 17:23:12 +02:00
2020-02-28 15:42:32 +01:00
2020-02-28 15:42:32 +01:00
2020-03-11 07:53:04 +01:00
2019-04-05 22:29:13 +02:00
2019-04-17 08:36:44 +02:00
2018-11-21 09:26:00 +01:00
2019-12-21 10:41:25 +01:00
2019-08-25 10:51:35 +02:00
2020-01-14 20:04:30 +01:00