From patchwork Thu Feb 12 11:29:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44633 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 350F621527 for ; Thu, 12 Feb 2015 11:31:23 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id y19sf6065075wgg.1 for ; Thu, 12 Feb 2015 03:31:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:content-type:content-transfer-encoding :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=xo7JkKqiJrlesCBt0lJaV2jky0sXFtjspdEVbHKx2Y0=; b=Xt0DeZNiCZaQlwEmBw0mRFnzORn4MOdUsFyZm2M7HVjP/RGsTce+mdI8YOyUP/sUU2 Uz8bWHz3pOX0jSqWnJ2gI6833HA8Ep0ZWrjmhiCZ+NLChNTcayh2rf4hDWBtXjkIO4KA sRIsLwhtb+k+UVwaSk3lAPMpNSAwJsDjpO+sKDAcQewStLT0kvOLAtLIbkdERuPmT2UF Vi08KsZ0CJRhTeIIV1FD4YoHjd3NjQG6XfWPAVs5Czr7FC+CQMNnrXRmY5ZGngDUl95d xEDMI0sQj+1zR4DDn1bw79aVikPGVLqT8HYDtvDB3g76oDNYgiV3V+L8gb6Qr+96UPYI UqHQ== X-Gm-Message-State: ALoCoQniTX0r+vR5MUR0Vi0X4Kz9hCGhN/qCW82ufr35qZyGwY6Ch7yyk/1wf+oc2zpy9k3DQ9On X-Received: by 10.112.99.37 with SMTP id en5mr483493lbb.17.1423740682038; Thu, 12 Feb 2015 03:31:22 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.10 with SMTP id ca10ls186056lad.33.gmail; Thu, 12 Feb 2015 03:31:21 -0800 (PST) X-Received: by 10.152.242.132 with SMTP id wq4mr2758985lac.79.1423740681763; Thu, 12 Feb 2015 03:31:21 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id q10si2657804lbl.167.2015.02.12.03.31.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 03:31:21 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labgd6 with SMTP id gd6so9413180lab.7 for ; Thu, 12 Feb 2015 03:31:21 -0800 (PST) X-Received: by 10.152.28.227 with SMTP id e3mr2656667lah.117.1423740681636; Thu, 12 Feb 2015 03:31:21 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp383363lbj; Thu, 12 Feb 2015 03:31:20 -0800 (PST) X-Received: by 10.140.39.84 with SMTP id u78mr8710465qgu.63.1423740680066; Thu, 12 Feb 2015 03:31:20 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id d35si4698976qgf.4.2015.02.12.03.31.19 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 12 Feb 2015 03:31:20 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YLrxm-0007Wx-So; Thu, 12 Feb 2015 11:29:42 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YLrxl-0007Wm-J0 for xen-devel@lists.xen.org; Thu, 12 Feb 2015 11:29:41 +0000 Received: from [85.158.143.35] by server-1.bemta-4.messagelabs.com id 95/C3-03000-4AE8CD45; Thu, 12 Feb 2015 11:29:40 +0000 X-Env-Sender: ard.biesheuvel@linaro.org X-Msg-Ref: server-4.tower-21.messagelabs.com!1423740579!13395301!1 X-Originating-IP: [209.85.220.45] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15627 invoked from network); 12 Feb 2015 11:29:40 -0000 Received: from mail-pa0-f45.google.com (HELO mail-pa0-f45.google.com) (209.85.220.45) by server-4.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 12 Feb 2015 11:29:40 -0000 Received: by mail-pa0-f45.google.com with SMTP id rd3so4124472pab.4 for ; Thu, 12 Feb 2015 03:29:38 -0800 (PST) X-Received: by 10.68.219.103 with SMTP id pn7mr5435434pbc.73.1423740578886; Thu, 12 Feb 2015 03:29:38 -0800 (PST) Received: from ards-macbook-pro.local ([210.177.145.249]) by mx.google.com with ESMTPSA id z12sm3599187pdk.2.2015.02.12.03.29.36 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 03:29:38 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, julien.grall@linaro.org, xen-devel@lists.xen.org Date: Thu, 12 Feb 2015 19:29:03 +0800 Message-Id: <1423740543-6168-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 Cc: leif.lindholm@linaro.org, Ard Biesheuvel Subject: [Xen-devel] [PATCH v2] xen/arm: allow console=hvc0 to be omitted for guests X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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 Reviewed-by: Julien Grall --- 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 0abeefa7dbf8..927be1d1bad7 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -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)