linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/arm: allow console=hvc0 to be omitted for guests
@ 2015-01-30 13:58 Ard Biesheuvel
  2015-02-10  7:00 ` Stefano Stabellini
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2015-01-30 13:58 UTC (permalink / raw)
  To: linux-arm-kernel

This patch registers hvc0 as the preferred console if no console
has been specified explicitly on the kernel command line.

The purpose is to allow platform agnostic kernels and boot images
(such as distro installers) to boot in a Xen/ARM domU without the
need to modify the command line by hand.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---

This applies on top of the patch Julien is cooking up to move the
call to xen_guest_init() to an earlier boot stage. This needs to
be at least before the call to console_init() in start_kernel()
for this patch to do anything meaningful.

 arch/arm/xen/enlighten.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index c7ca936ebd99..61382cafa877 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -24,6 +24,7 @@
 #include <linux/cpuidle.h>
 #include <linux/cpufreq.h>
 #include <linux/cpu.h>
+#include <linux/console.h>
 
 #include <linux/mm.h>
 
@@ -322,6 +323,9 @@ static int __init xen_guest_init(void)
 
 	register_cpu_notifier(&xen_cpu_notifier);
 
+	if (!console_set_on_cmdline)
+		add_preferred_console("hvc", 0, NULL);
+
 	return 0;
 }
 early_initcall(xen_guest_init);
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-12  6:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-30 13:58 [PATCH] xen/arm: allow console=hvc0 to be omitted for guests Ard Biesheuvel
2015-02-10  7:00 ` Stefano Stabellini
2015-02-10  7:26   ` Ian Campbell
2015-02-10  7:51     ` Ard Biesheuvel
2015-02-10  8:59       ` Ian Campbell
2015-02-12  4:35         ` Stefano Stabellini
2015-02-12  4:52           ` Stefano Stabellini
2015-02-12  4:54           ` Ian Campbell
2015-02-12  5:20             ` Julien Grall
2015-02-12  6:12               ` Stefano Stabellini
2015-02-10  7:36   ` Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).