linux/debian/patches/bugfix/powerpc/lpar-console.patch

47 lines
1.6 KiB
Diff

From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 1 Sep 2013 17:24:16 +0100
Subject: hvc_vio: Do not override preferred console set by kernel parameter
Bug-Debian: http://bugs.debian.org/492703
Origin: https://git.kernel.org/?p=linux/kernel/git/gregkh/tty.git;a=commit;h=1926d0aeecf0280c67bf7464b2d68fe4e92c566b
The original version of this was done by Bastian Blank, who wrote:
> The problem is the following:
> - Architecture specific code sets preferred console to something bogus.
> - Command line handling tries to set preferred console but is overruled
> by the old setting.
>
> The udbg0 console is a boot console and independant.
References: http://bugs.debian.org/492703
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/hvc/hvc_vio.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index c791b18..b594abf 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -48,6 +48,7 @@
#include <asm/prom.h>
#include <asm/hvsi.h>
#include <asm/udbg.h>
+#include <asm/machdep.h>
#include "hvc_console.h"
@@ -457,7 +458,9 @@ void __init hvc_vio_init_early(void)
if (hvterm_priv0.proto == HV_PROTOCOL_HVSI)
goto out;
#endif
- add_preferred_console("hvc", 0, NULL);
+ /* Check whether the user has requested a different console. */
+ if (!strstr(cmd_line, "console="))
+ add_preferred_console("hvc", 0, NULL);
hvc_instantiate(0, 0, ops);
out:
of_node_put(stdout_node);