Commit 5faae2e5 authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[POWERPC] Always add preferred consoles in platforms/pseries/lpar.c

There is logic in platforms/peries/lpars.c which checks if the user has
specified a console on the command line, and refrains from adding a
preferred console entry for the hvc/hvsi console if they have.

This trips up if you use "netconsole=foo" on the command line, and has
the result that you get _only_ the netconsole, because the hvc device is
never added as a preferred console. Worse still if you get the netconsole
configuration wrong somehow, you end up with no console at all.

As it turns out we don't need to worry about checking the command line.
If the user has specified "console=foo", then foo will be set as the
preferred console when the command line is parsed in start_kernel(), much
later than the pseries code, and so the latter setting will take effect.
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 21cf9133
...@@ -204,7 +204,6 @@ void __init find_udbg_vterm(void) ...@@ -204,7 +204,6 @@ void __init find_udbg_vterm(void)
struct device_node *stdout_node; struct device_node *stdout_node;
const u32 *termno; const u32 *termno;
const char *name; const char *name;
int add_console;
/* find the boot console from /chosen/stdout */ /* find the boot console from /chosen/stdout */
if (!of_chosen) if (!of_chosen)
...@@ -220,8 +219,6 @@ void __init find_udbg_vterm(void) ...@@ -220,8 +219,6 @@ void __init find_udbg_vterm(void)
printk(KERN_WARNING "stdout node missing 'name' property!\n"); printk(KERN_WARNING "stdout node missing 'name' property!\n");
goto out; goto out;
} }
/* The user has requested a console so this is already set up. */
add_console = !strstr(cmd_line, "console=");
/* Check if it's a virtual terminal */ /* Check if it's a virtual terminal */
if (strncmp(name, "vty", 3) != 0) if (strncmp(name, "vty", 3) != 0)
...@@ -235,14 +232,12 @@ void __init find_udbg_vterm(void) ...@@ -235,14 +232,12 @@ void __init find_udbg_vterm(void)
udbg_putc = udbg_putcLP; udbg_putc = udbg_putcLP;
udbg_getc = udbg_getcLP; udbg_getc = udbg_getcLP;
udbg_getc_poll = udbg_getc_pollLP; udbg_getc_poll = udbg_getc_pollLP;
if (add_console)
add_preferred_console("hvc", termno[0] & 0xff, NULL); add_preferred_console("hvc", termno[0] & 0xff, NULL);
} else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) {
vtermno = termno[0]; vtermno = termno[0];
udbg_putc = udbg_hvsi_putc; udbg_putc = udbg_hvsi_putc;
udbg_getc = udbg_hvsi_getc; udbg_getc = udbg_hvsi_getc;
udbg_getc_poll = udbg_hvsi_getc_poll; udbg_getc_poll = udbg_hvsi_getc_poll;
if (add_console)
add_preferred_console("hvsi", termno[0] & 0xff, NULL); add_preferred_console("hvsi", termno[0] & 0xff, NULL);
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment