Fugang Duan
772ff2c77c
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:29:20 +01:00
..
2020-11-10 12:37:32 +01:00
2019-05-24 10:09:16 +02:00
2019-04-04 18:48:43 +02:00
2020-11-01 12:01:06 +01:00
2020-03-12 13:00:10 +01:00
2020-02-28 17:22:19 +01:00
2018-10-02 13:38:55 -07:00
2019-01-08 16:55:18 +01:00
2019-06-10 19:08:31 +02:00
2019-01-23 15:41:50 -08:00
2018-05-14 13:41:05 +02:00
2019-10-04 15:02:28 +02:00
2020-11-10 12:37:33 +01:00
2019-09-04 12:43:44 +02:00
2019-12-13 08:42:25 +01:00
2020-11-24 13:29:20 +01:00
2020-10-29 09:57:37 +01:00
2020-06-22 09:31:06 +02:00
2019-09-04 12:43:53 +02:00
2019-09-18 10:50:47 -07:00
2019-09-18 10:50:47 -07:00
2019-09-05 09:57:44 +02:00
2019-04-08 12:01:02 +01:00
2019-01-18 11:22:22 +01:00
2019-04-29 16:20:24 +02:00
2019-01-31 19:34:10 +01:00
2020-01-09 10:20:05 +01:00
2020-03-12 13:00:20 +01:00
2020-07-22 09:33:11 +02:00
2020-04-29 16:33:14 +02:00
2020-01-17 19:48:55 +01:00
2018-11-09 09:07:17 -08:00
2018-12-17 16:12:17 +01:00
2018-06-28 21:07:54 +09:00
2020-11-01 12:01:06 +01:00
2019-10-04 15:01:15 +02:00
2018-06-12 16:19:22 -07:00
2019-06-04 12:56:33 +01:00
2020-10-01 13:18:00 +02:00
2019-04-21 23:20:08 +02:00
2019-09-04 12:43:49 +02:00
2020-01-14 20:08:33 +01:00
2019-10-07 13:21:54 +02:00
2019-09-04 12:43:50 +02:00
2020-11-10 12:37:32 +01:00
2020-07-29 10:18:42 +02:00
2020-04-29 16:33:24 +02:00
2018-04-23 10:08:18 +02:00
2020-10-01 13:17:42 +02:00
2020-04-02 15:10:59 +02:00
2018-04-22 17:29:43 +02:00
2020-09-03 11:27:03 +02:00
2019-06-21 11:17:36 +02:00
2018-12-17 16:12:17 +01:00
2019-06-13 14:04:37 -07:00
2018-06-12 16:19:22 -07:00
2018-12-28 20:33:54 -08:00
2019-01-30 09:31:31 +01:00
2019-10-04 15:02:46 +02:00
2019-07-15 11:03:03 -03:00
2020-10-01 13:17:55 +02:00