Skip to contentSkip to conversation

xen: make earlyprintk=xen work again

PATCH New Jeremy Fitzhardinge 1 participant 1 message May 24, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: make earlyprintk=xen work again

For some perverse reason, if you call add_preferred_console() it prevents setup_early_printk() from successfully enabling the boot console - unless you make it a preferred console too...

Also, make xenboot console output distinct from normal console output, since it gets repeated when the console handover happens, and the duplicated output is confusing without disambiguation.

[ Applies to end of xen pvfb series ]

Cc Markus Armbruster <[email protected]>
Cc Gerd Hoffmann <[email protected]>

---

arch/x86/xen/enlighten.c |    1 +
drivers/char/hvc_xen.c   |    1 +
2 files changed, 2 insertions(+)

===================================================================

arch/x86/xen/enlighten.c +0 -0
@@ -1270,6 +1270,7 @@ asmlinkage void __init xen_start_kernel(
	boot_params.hdr.ramdisk_size = xen_start_info->mod_len;

	if (!is_initial_xendomain()) {
+		add_preferred_console("xenboot", 0, NULL);
		add_preferred_console("tty", 0, NULL);
		add_preferred_console("hvc", 0, NULL);
	}

===================================================================

drivers/char/hvc_xen.c +0 -0
@@ -172,6 +172,7 @@ static void xenboot_write_console(struct
 
	raw_console_write(string, len);
+	write_console(0, "(early) ", 8);
	while (off < len && NULL != (pos = strchr(string+off, '\n'))) {
		linelen = pos-string+off;
		if (off + linelen > len)