mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
tty: serial: add missing spin_lock_init for SiFive serial console
commit 17b4efdf4e4867079012a48ca10d965fe9d68822 upstream.
An uninitialised spin lock for sifive serial console raises a bad
magic spin_lock error as reported and discussed here [1].
Initialising the spin lock resolves the issue.
The fix is tested on HiFive Unleashed A00 board with Linux 5.7-rc4
and OpenSBI v0.7
[1] https://lore.kernel.org/linux-riscv/[email protected]
Fixes: 45c054d081 ("tty: serial: add driver for the SiFive UART")
Reported-by: Atish Patra <[email protected]>
Signed-off-by: Sagar Shrikant Kadam <[email protected]>
Reviewed-by: Palmer Dabbelt <[email protected]>
Acked-by: Palmer Dabbelt <[email protected]>
Cc: stable <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a5b4b3f97d
commit
f505a3e24c
1 changed files with 1 additions and 0 deletions
|
|
@ -840,6 +840,7 @@ console_initcall(sifive_console_init);
|
|||
|
||||
static void __ssp_add_console_port(struct sifive_serial_port *ssp)
|
||||
{
|
||||
spin_lock_init(&ssp->port.lock);
|
||||
sifive_serial_console_ports[ssp->port.line] = ssp;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue