linux/drivers/tty/serial/cpm_uart
Rasmus Villemoes 4508cf76b1 serial: cpm_uart: call cpm_muram_init before registering console
Christophe reports that powerpc 8xx silently fails to 5.6-rc1. It turns
out I was wrong about nobody relying on the lazy initialization of the
cpm/qe muram in commit b6231ea2b3 (soc: fsl: qe: drop broken lazy
call of cpm_muram_init()).

Rather than reinstating the somewhat dubious lazy call (initializing a
currently held spinlock, and implicitly doing a GFP_KERNEL under that
spinlock), make sure that cpm_muram_init() is called early enough - I
thought the calls from the subsys_initcalls were good enough, but when
used by console drivers, that's obviously not the
case. cpm_muram_init() is safe to call twice (there's an early return
if it is already initialized), so keep the call from cpm_init() - in
case SERIAL_CPM_CONSOLE=n.

Fixes: b6231ea2b3 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())
Reported-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Tested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Link: https://lore.kernel.org/r/20200213114342.21712-1-linux@rasmusvillemoes.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-13 12:03:26 -08:00
..
Makefile tty: add SPDX identifiers to Kconfig and Makefiles 2019-04-04 18:48:43 +02:00
cpm_uart.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
cpm_uart_core.c serial: cpm_uart: call cpm_muram_init before registering console 2020-02-13 12:03:26 -08:00
cpm_uart_cpm1.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
cpm_uart_cpm1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpm_uart_cpm2.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
cpm_uart_cpm2.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00