parisc: Autodetect default output device and set console= kernel parameter
authorHelge Deller <deller@gmx.de>
Fri, 14 Jan 2022 06:57:20 +0000 (07:57 +0100)
committerHelge Deller <deller@gmx.de>
Thu, 20 Jan 2022 19:39:19 +0000 (20:39 +0100)
commit5f7ee6e37a3cadefe45378c17c4285fa41141d92
tree9d60950a43d2e23bfd7d9ac39da0cd3a3b8a2610
parentbd25c378527f3fde38a496ac2744cbd3924f0803
parisc: Autodetect default output device and set console= kernel parameter

Usually palo (the PA-RISC boot loader) will check at boot time if the
machine/firmware was configured to use the serial line (ttyS0, SERIAL_x)
or the graphical display (tty0, graph) as default output device and add
the correct "console=ttyS0" or "console=tty0" Linux kernel parameter to
the kernel command line when starting the Linux kernel.

But the kernel could also have been started via the HP-UX boot loader
or directly in qemu, in which cases the console parameter is missing.

This patch fixes this problem by adding the correct console= parameter
if it's missing in the current kernel command line.

Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/setup.c