]> xenbits.xensource.com Git - people/sstabellini/linux-pvhvm-deprecated.git/commitdiff
ARM: enable earlyprintk=xen
authorIan Campbell <ian.campbell@citrix.com>
Wed, 25 Jul 2012 18:21:02 +0000 (18:21 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 26 Jul 2012 15:03:05 +0000 (15:03 +0000)
Currently ARM setup_early_printk does not support alternative early
consoles and it always registers early_console only.

This patch adds support for xenboot_console.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
arch/arm/kernel/early_printk.c

index 85aa2b292692b5296f86ca57851bab1e5c9cab05..eecfa21d2039aab024020c0028325f10aa4c8308 100644 (file)
@@ -11,6 +11,8 @@
 #include <linux/kernel.h>
 #include <linux/console.h>
 #include <linux/init.h>
+#include <linux/string.h>
+#include <xen/hvc-console.h>
 
 extern void printch(int);
 
@@ -50,7 +52,14 @@ asmlinkage void early_printk(const char *fmt, ...)
 
 static int __init setup_early_printk(char *buf)
 {
-       register_console(&early_console);
+       if (!buf || !strncmp(buf, "serial", 6))
+               register_console(&early_console);
+
+#ifdef CONFIG_HVC_XEN
+       if (!strncmp(buf, "xen", 3))
+               register_console(&xenboot_console);
+#endif
+
        return 0;
 }