diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-04-15 23:51:49 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-16 20:00:59 -0400 |
commit | 5faae2e5d1f53df9dce482032c8486bc3a1feffc (patch) | |
tree | d2e8dfc12d054c9cdc50b8fa7cf64707814f7e0f | |
parent | 21cf91338fabe649ae3744429e13b61da2a17a6a (diff) |
[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: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/platforms/pseries/lpar.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 8a204523afbc..9235c469449e 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -204,7 +204,6 @@ void __init find_udbg_vterm(void) | |||
204 | struct device_node *stdout_node; | 204 | struct device_node *stdout_node; |
205 | const u32 *termno; | 205 | const u32 *termno; |
206 | const char *name; | 206 | const char *name; |
207 | int add_console; | ||
208 | 207 | ||
209 | /* find the boot console from /chosen/stdout */ | 208 | /* find the boot console from /chosen/stdout */ |
210 | if (!of_chosen) | 209 | if (!of_chosen) |
@@ -220,8 +219,6 @@ void __init find_udbg_vterm(void) | |||
220 | printk(KERN_WARNING "stdout node missing 'name' property!\n"); | 219 | printk(KERN_WARNING "stdout node missing 'name' property!\n"); |
221 | goto out; | 220 | goto out; |
222 | } | 221 | } |
223 | /* The user has requested a console so this is already set up. */ | ||
224 | add_console = !strstr(cmd_line, "console="); | ||
225 | 222 | ||
226 | /* Check if it's a virtual terminal */ | 223 | /* Check if it's a virtual terminal */ |
227 | if (strncmp(name, "vty", 3) != 0) | 224 | if (strncmp(name, "vty", 3) != 0) |
@@ -235,15 +232,13 @@ void __init find_udbg_vterm(void) | |||
235 | udbg_putc = udbg_putcLP; | 232 | udbg_putc = udbg_putcLP; |
236 | udbg_getc = udbg_getcLP; | 233 | udbg_getc = udbg_getcLP; |
237 | udbg_getc_poll = udbg_getc_pollLP; | 234 | udbg_getc_poll = udbg_getc_pollLP; |
238 | if (add_console) | 235 | add_preferred_console("hvc", termno[0] & 0xff, NULL); |
239 | add_preferred_console("hvc", termno[0] & 0xff, NULL); | ||
240 | } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { | 236 | } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { |
241 | vtermno = termno[0]; | 237 | vtermno = termno[0]; |
242 | udbg_putc = udbg_hvsi_putc; | 238 | udbg_putc = udbg_hvsi_putc; |
243 | udbg_getc = udbg_hvsi_getc; | 239 | udbg_getc = udbg_hvsi_getc; |
244 | udbg_getc_poll = udbg_hvsi_getc_poll; | 240 | udbg_getc_poll = udbg_hvsi_getc_poll; |
245 | if (add_console) | 241 | add_preferred_console("hvsi", termno[0] & 0xff, NULL); |
246 | add_preferred_console("hvsi", termno[0] & 0xff, NULL); | ||
247 | } | 242 | } |
248 | out: | 243 | out: |
249 | of_node_put(stdout_node); | 244 | of_node_put(stdout_node); |