tty: serial: add missing spin_lock_init for SiFive serial console
authorSagar Shrikant Kadam <sagar.kadam@sifive.com>
Sat, 9 May 2020 10:24:12 +0000 (03:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 May 2020 12:55:10 +0000 (14:55 +0200)
commit17b4efdf4e4867079012a48ca10d965fe9d68822
treedbabe2a9d97e11d55a079f4251fd3a0ea670e826
parent2ef96a5bb12be62ef75b5828c0aab838ebb29cb8
tty: serial: add missing spin_lock_init for SiFive serial console

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/b9fe49483a903f404e7acc15a6efbef756db28ae.camel@wdc.com

Fixes: 45c054d0815b ("tty: serial: add driver for the SiFive UART")
Reported-by: Atish Patra <Atish.Patra@wdc.com>
Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1589019852-21505-2-git-send-email-sagar.kadam@sifive.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sifive.c