serial: cpm_uart: call cpm_muram_init before registering console
PATCH 1/1 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 b6231ea2b3c6 (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.
---
Christophe, can I get you to add a formal Tested-by?
I'm not sure which tree this should go through.
drivers/tty/serial/cpm_uart/cpm_uart_core.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/cpm_uart/cpm_uart_core.c +1 -0
@@ -1373,6 +1373,7 @@ static struct console cpm_scc_uart_console = {static int __init cpm_uart_console_init (void ) { +cpm_muram_init ();register_console (&cpm_scc_uart_console);return 0 ; }
Signature · 1 line
2.23.0
Le 13/02/2020 à 12:43, Rasmus Villemoes a écrit :
Quoted 14 lines
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
b6231ea2b3c6(soc: fsl: qe: drop broken lazy call ofcpm_muram_init()).Rather than reinstating the somewhat dubious lazy call (initializing a currently held spinlock, and implicitly doing a
GFP_KERNELunder that spinlock), make sure thatcpm_muram_init()is called early enough - I thought the calls from thesubsys_initcallswere 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 fromcpm_init()- in case SERIAL_CPM_CONSOLE=n.
Quoted 3 lines
Reported-by Christophe Leroy <[email protected]>Fixes b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())Signed-off-by Rasmus Villemoes <[email protected]>
Quoted 22 lines
---
Christophe, can I get you to add a formal Tested-by?
I'm not sure which tree this should go through.
drivers/tty/serial/cpm_uart/cpm_uart_core.c | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/cpm_uart/cpm_uart_core.c +1
-0@@ -1373,6 +1373,7 @@ static struct console cpm_scc_uart_console = {static int __init cpm_uart_console_init (void ) { +cpm_muram_init ();register_console (&cpm_scc_uart_console);return 0 ; }
Greg Kroah-Hartman
maintainerQuoted 14 lines · Rasmus Villemoes
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
b6231ea2b3c6(soc: fsl: qe: drop broken lazy call ofcpm_muram_init()).Rather than reinstating the somewhat dubious lazy call (initializing a currently held spinlock, and implicitly doing a
GFP_KERNELunder that spinlock), make sure thatcpm_muram_init()is called early enough - I thought the calls from thesubsys_initcallswere 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 fromcpm_init()- in case SERIAL_CPM_CONSOLE=n.
Quoted 8 lines
Reported-by Christophe Leroy <[email protected]>Fixes b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())Signed-off-by Rasmus Villemoes <[email protected]>---
Christophe, can I get you to add a formal Tested-by?
I'm not sure which tree this should go through.
I can take it, thanks.
greg k-h
Quoted 27 lines
-----Original Message-----
From: Rasmus Villemoes <[email protected]>
Sent: Thursday, February 13, 2020 5:44 AM
To: Greg Kroah-Hartman <[email protected]>; Jiri Slaby <[email protected]>; Timur Tabi <[email protected]>; Leo Li <[email protected]>; Rasmus Villemoes <[email protected]>
Cc: Qiang Zhao <[email protected]>; [email protected]; Scott Wood <[email protected]>; Christophe Leroy <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] serial:cpm_uart: callcpm_muram_initbefore registering consoleChristophe 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
b6231ea2b3c6(soc: fsl: qe: drop broken lazy call ofcpm_muram_init()).Rather than reinstating the somewhat dubious lazy call (initializing a currently held spinlock, and implicitly doing a
GFP_KERNELunder that spinlock), make sure thatcpm_muram_init()is called early enough - I thought the calls from thesubsys_initcallswere 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 fromcpm_init()- in case SERIAL_CPM_CONSOLE=n.
Quoted 3 lines
Reported-by Christophe Leroy <[email protected]>Fixes b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())Signed-off-by Rasmus Villemoes <[email protected]>
Quoted 23 lines
---
Christophe, can I get you to add a formal Tested-by?
I'm not sure which tree this should go through.
drivers/tty/serial/cpm_uart/cpm_uart_core.c | 1 + 1 file changed, 1 insertion(+)drivers/tty/serial/cpm_uart/cpm_uart_core.c +1
-1@@ -1373,6 +1373,7 @@ static struct console cpm_scc_uart_console = {static int __init cpm_uart_console_init (void ) { +cpm_muram_init ();register_console (&cpm_scc_uart_console);return 0 ; } --2.23.0