Commit e67c139
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: 1cf93e0 ("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>1 parent d412275 commit e67c139
1 file changed
Lines changed: 3 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2008 | 2008 | | |
2009 | 2009 | | |
2010 | 2010 | | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | 2011 | | |
2022 | 2012 | | |
2023 | 2013 | | |
| |||
2053 | 2043 | | |
2054 | 2044 | | |
2055 | 2045 | | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | 2046 | | |
2060 | 2047 | | |
2061 | 2048 | | |
| |||
2156 | 2143 | | |
2157 | 2144 | | |
2158 | 2145 | | |
2159 | | - | |
2160 | 2146 | | |
2161 | | - | |
| 2147 | + | |
2162 | 2148 | | |
2163 | 2149 | | |
2164 | 2150 | | |
2165 | | - | |
| 2151 | + | |
2166 | 2152 | | |
2167 | | - | |
| 2153 | + | |
2168 | 2154 | | |
2169 | 2155 | | |
2170 | 2156 | | |
| |||
0 commit comments