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.
Reported-by: Christophe Leroy <redacted>
Fixes: b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
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(+)
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.
Reported-by: Christophe Leroy <redacted>
Fixes: b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Tested-by: Christophe Leroy <redacted>
quoted hunk
---
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(+)
On Thu, Feb 13, 2020 at 12:43:42PM +0100, Rasmus Villemoes wrote:
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.
Reported-by: Christophe Leroy <redacted>
Fixes: b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
Christophe, can I get you to add a formal Tested-by?
I'm not sure which tree this should go through.
-----Original Message-----
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Sent: Thursday, February 13, 2020 5:44 AM
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby
[off-list ref]; Timur Tabi [off-list ref]; Leo Li
[off-list ref]; Rasmus Villemoes [off-list ref]
Cc: Qiang Zhao <qiang.zhao@nxp.com>; linuxppc-dev@lists.ozlabs.org; Scott
Wood [off-list ref]; Christophe Leroy [off-list ref];
linux-serial@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: [PATCH] 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.
Reported-by: Christophe Leroy <redacted>
Fixes: b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init())
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Li Yang <redacted>
quoted hunk
---
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(+)