[PATCH v2 3/3] xen/arm: allow console=hvc0 to be omitted for guests

Rob Herring robherring2 at gmail.com
Wed Feb 18 07:50:12 PST 2015


On Wed, Feb 18, 2015 at 7:51 AM, Julien Grall <julien.grall at linaro.org> wrote:
> From: Ard Biesheuvel <ard.biesheuvel at 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.

How does this interact with DT chosen stdout-path?

Is there a node for hvc0?

Rob

>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> Reviewed-by: Julien Grall <julien.grall at 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
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list