All of lore.kernel.org
 help / color / mirror / Atom feed
From: julien.grall@linaro.org (Julien Grall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] xen/arm: allow console=hvc0 to be omitted for guests
Date: Wed, 18 Feb 2015 13:51:53 +0000	[thread overview]
Message-ID: <1424267513-15836-4-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1424267513-15836-1-git-send-email-julien.grall@linaro.org>

From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

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>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
---
 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 1660432..904bd2d 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>
 
@@ -255,6 +256,9 @@ void __init xen_early_init(void)
 		xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
 	else
 		xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED);
+
+	if (!console_set_on_cmdline && !xen_initial_domain())
+		add_preferred_console("hvc", 0, NULL);
 }
 
 static int __init xen_guest_init(void)
-- 
2.1.4

  parent reply	other threads:[~2015-02-18 13:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 13:51 [PATCH v2 0/3] arm/arm64: Detect Xen support earlier Julien Grall
2015-02-18 13:51 ` [PATCH v2 1/3] arm/xen: Correctly check if the event channel interrupt is present Julien Grall
2015-02-18 13:51 ` Julien Grall
2015-02-26 18:08   ` Stefano Stabellini
2015-02-26 18:08   ` Stefano Stabellini
2015-02-18 13:51 ` [PATCH v2 2/3] arm,arm64/xen: move Xen initialization earlier Julien Grall
2015-02-18 13:51   ` [PATCH v2 2/3] arm, arm64/xen: " Julien Grall
2015-04-07 17:26   ` [PATCH v2 2/3] arm,arm64/xen: " Stefano Stabellini
2015-04-07 17:26     ` [PATCH v2 2/3] arm, arm64/xen: " Stefano Stabellini
2015-05-06 14:04     ` Stefano Stabellini
2015-05-06 14:04     ` [PATCH v2 2/3] arm,arm64/xen: " Stefano Stabellini
2015-02-18 13:51 ` Julien Grall [this message]
2015-02-18 15:25   ` [PATCH v2 3/3] xen/arm: allow console=hvc0 to be omitted for guests Ian Campbell
2015-02-18 15:25   ` Ian Campbell
2015-02-18 15:50   ` Rob Herring
2015-02-18 16:03     ` Ian Campbell
2015-02-18 16:03     ` Ian Campbell
2015-02-26 18:22       ` Stefano Stabellini
2015-02-27  9:34         ` Ian Campbell
2015-02-27  9:34         ` Ian Campbell
2015-02-27  9:47           ` Stefano Stabellini
2015-02-27  9:47           ` Stefano Stabellini
2015-02-26 18:22       ` Stefano Stabellini
2015-02-18 15:50   ` Rob Herring
2015-02-18 13:51 ` Julien Grall
2015-02-25 16:22 ` [PATCH v2 0/3] arm/arm64: Detect Xen support earlier Julien Grall
2015-02-25 16:22   ` Julien Grall
2015-02-25 16:34   ` Will Deacon
2015-02-25 16:34     ` Will Deacon
2015-02-25 16:38     ` Julien Grall
2015-02-25 16:38       ` Julien Grall
2015-02-25 16:40     ` [Xen-devel] " Ian Campbell
2015-02-25 18:01       ` Will Deacon
2015-02-25 18:01       ` Will Deacon
2015-02-25 16:40     ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424267513-15836-4-git-send-email-julien.grall@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.