[sparc64] Fix device naming inconsistency between sunhv_console and sunhv_reg (Closes: #926539)

This commit is contained in:
Romain Perier 2019-06-19 16:22:29 +02:00
parent 8533f7d9e6
commit d2962338d6
3 changed files with 72 additions and 0 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
linux (4.19.37-5) UNRELEASED; urgency=medium
[ Romain Perier ]
* [sparc64] Fix device naming inconsistency between sunhv_console and sunhv_reg
(Closes: #926539)
-- Romain Perier <romain.perier@gmail.com> Wed, 19 Jun 2019 16:20:29 +0200
linux (4.19.37-4) unstable; urgency=high
[ Ben Hutchings ]

View File

@ -0,0 +1,63 @@
From foo@baz Wed 19 Jun 2019 02:34:37 PM CEST
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Tue, 11 Jun 2019 17:38:37 +0200
Subject: sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg
Bug-Debian: https://bugs.debian.org/926539
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc.git/commit/?id=07a6d63eb1b54b5fb38092780fe618dfe1d96e23
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
[ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ]
In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS"
to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged.
This results in the hypervisor console device to be listed as "ttyHV0" under
/proc/consoles while the device node is still named "ttyS0":
root@osaka:~# cat /proc/consoles
ttyHV0 -W- (EC p ) 4:64
tty0 -WU (E ) 4:1
root@osaka:~# readlink /sys/dev/char/4:64
../../devices/root/f02836f0/f0285690/tty/ttyS0
root@osaka:~#
This means that any userland code which tries to determine the name of the
device file of the hypervisor console device can not rely on the information
provided by /proc/consoles. In particular, booting current versions of debian-
installer inside a SPARC LDOM will fail with the installer unable to determine
the console device.
After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well,
the inconsistency is fixed and it is possible again to determine the name
of the device file of the hypervisor console device by reading the contents
of /proc/console:
root@osaka:~# cat /proc/consoles
ttyHV0 -W- (EC p ) 4:64
tty0 -WU (E ) 4:1
root@osaka:~# readlink /sys/dev/char/4:64
../../devices/root/f02836f0/f0285690/tty/ttyHV0
root@osaka:~#
With this change, debian-installer works correctly when installing inside
a SPARC LDOM.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/sunhv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -397,7 +397,7 @@ static const struct uart_ops sunhv_pops
static struct uart_driver sunhv_reg = {
.owner = THIS_MODULE,
.driver_name = "sunhv",
- .dev_name = "ttyS",
+ .dev_name = "ttyHV",
.major = TTY_MAJOR,
};

View File

@ -83,6 +83,7 @@ bugfix/mips/MIPS-Loongson-Introduce-and-use-loongson_llsc_mb.patch
bugfix/powerpc/powerpc-vdso-make-vdso32-installation-conditional-in.patch
bugfix/mips/MIPS-scall64-o32-Fix-indirect-syscall-number-load.patch
bugfix/mips/MIPS-Bounds-check-virt_addr_valid.patch
bugfix/sparc64/sunhv-fix-device-naming-inconsistency-between-sunhv_console-and-sunhv_reg.patch
# Arch features
features/mips/MIPS-increase-MAX-PHYSMEM-BITS-on-Loongson-3-only.patch