Thread (99 messages) 99 messages, 9 authors, 2012-08-06
STALE5062d
Revisions (3)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 22/24] ARM: enable earlyprintk=xen

From: Stefano Stabellini <hidden>
Date: 2012-07-26 15:56:12
Also in: lkml, xen-devel
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

From: Ian Campbell <redacted>

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 <redacted>
Signed-off-by: Stefano Stabellini <redacted>
---
 arch/arm/kernel/early_printk.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c
index 85aa2b2..eecfa21 100644
--- a/arch/arm/kernel/early_printk.c
+++ b/arch/arm/kernel/early_printk.c
@@ -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;
 }
 
-- 
1.7.2.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help