xen: make hvc0 the preferred console in domU
authorMarkus Armbruster <armbru@redhat.com>
Wed, 27 Feb 2008 13:56:35 +0000 (14:56 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 15:40:51 +0000 (17:40 +0200)
This makes the Xen console just work.  Before, you had to ask for it
on the kernel command line with console=hvc0

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/xen/enlighten.c

index 27ee26aedf941d98e2cdaf5e8fa90ba1a7ee5930..198db49106b2af0a4047723e21c15d30360e6e77 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mm.h>
 #include <linux/page-flags.h>
 #include <linux/highmem.h>
+#include <linux/console.h>
 
 #include <xen/interface/xen.h>
 #include <xen/interface/physdev.h>
@@ -1228,6 +1229,9 @@ asmlinkage void __init xen_start_kernel(void)
                ? __pa(xen_start_info->mod_start) : 0;
        boot_params.hdr.ramdisk_size = xen_start_info->mod_len;
 
+       if (!is_initial_xendomain())
+               add_preferred_console("hvc", 0, NULL);
+
        /* Start the world */
        start_kernel();
 }