aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2008-05-26 18:31:07 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-27 04:11:36 -0400
commit9e124fe16ff24746d6de5a2ad685266d7bce0e08 (patch)
tree6be2bf0edd3799170c74f3fff15f1adf14e0380b /kernel/printk.c
parenta15af1c9ea2750a9ff01e51615c45950bad8221b (diff)
xen: Enable console tty by default in domU if it's not a dummy
Without console= arguments on the kernel command line, the first console to register becomes enabled and the preferred console (the one behind /dev/console). This is normally tty (assuming CONFIG_VT_CONSOLE is enabled, which it commonly is). This is okay as long tty is a useful console. But unless we have the PV framebuffer, and it is enabled for this domain, tty0 in domU is merely a dummy. In that case, we want the preferred console to be the Xen console hvc0, and we want it without having to fiddle with the kernel command line. Commit b8c2d3dfbc117dff26058fbac316b8acfc2cb5f7 did that for us. Since we now have the PV framebuffer, we want to enable and prefer tty again, but only when PVFB is enabled. But even then we still want to enable the Xen console as well. Problem: when tty registers, we can't yet know whether the PVFB is enabled. By the time we can know (xenstore is up), the console setup game is over. Solution: enable console tty by default, but keep hvc as the preferred console. Change the preferred console to tty when PVFB probes successfully, unless we've been given console kernel parameters. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 8fb01c32aa3b..028ed75d4864 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -121,6 +121,8 @@ struct console_cmdline
121static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; 121static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
122static int selected_console = -1; 122static int selected_console = -1;
123static int preferred_console = -1; 123static int preferred_console = -1;
124int console_set_on_cmdline;
125EXPORT_SYMBOL(console_set_on_cmdline);
124 126
125/* Flag: console code may call schedule() */ 127/* Flag: console code may call schedule() */
126static int console_may_schedule; 128static int console_may_schedule;
@@ -890,6 +892,7 @@ static int __init console_setup(char *str)
890 *s = 0; 892 *s = 0;
891 893
892 __add_preferred_console(buf, idx, options, brl_options); 894 __add_preferred_console(buf, idx, options, brl_options);
895 console_set_on_cmdline = 1;
893 return 1; 896 return 1;
894} 897}
895__setup("console=", console_setup); 898__setup("console=", console_setup);