From patchwork Wed Feb 18 13:51:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 44773 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 94A3C21544 for ; Wed, 18 Feb 2015 13:54:19 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id k14sf894773wgh.0 for ; Wed, 18 Feb 2015 05:54:18 -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:in-reply-to :references: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=zsFDNkP1DyLJXPxvQY1DBgeCakMeMkdMjVZ7WU52BcU=; b=aXnKaJSGyf/aWGZeqQv3e4bJGDnCq02jgvJz68C9KcPYuievMMOXIf74OhcUrR3TqD pfBu0SDMSTJxmYMvpHFNa1W1FpCA0luvXQ4mGmXDb3o8cuoh4GoMQoeIzSLWaIDPoX66 g0jofXu15ZHifc+8py8XLfKt4vdvO6O4Mt7lVk+57Dev5vZBw0w68vbHA3L6UdTMKNp2 lHg7aO8Oc8IMpM2bKvFURwUOJ0zW6L53f5+zZ7p5AUUfYdNfr/CFTdhSv+gwO0FVLX07 1y9GNRVFk8cJIWho0ZIHM7V0dqxSEqrR1JEyvra582QdJVx1pyjVNZqXDPzB/fAsP5p/ 8+Lg== X-Gm-Message-State: ALoCoQmn2CBm358EuSZ8gtDC6k4OUmz9TuR5WxXruj3F6GEIKlU4lPr5ADLMp2sowLe+u82R9Dap X-Received: by 10.180.94.134 with SMTP id dc6mr368703wib.2.1424267658863; Wed, 18 Feb 2015 05:54:18 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.132 with SMTP id b4ls23469lah.33.gmail; Wed, 18 Feb 2015 05:54:18 -0800 (PST) X-Received: by 10.152.44.225 with SMTP id h1mr4375278lam.99.1424267658558; Wed, 18 Feb 2015 05:54:18 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id xt10si2602707lab.7.2015.02.18.05.54.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Feb 2015 05:54:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by labhs14 with SMTP id hs14so1270859lab.1 for ; Wed, 18 Feb 2015 05:54:18 -0800 (PST) X-Received: by 10.112.188.165 with SMTP id gb5mr17644065lbc.35.1424267658438; Wed, 18 Feb 2015 05:54:18 -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 h5csp2863061lbj; Wed, 18 Feb 2015 05:54:17 -0800 (PST) X-Received: by 10.220.110.19 with SMTP id l19mr2338091vcp.28.1424267656636; Wed, 18 Feb 2015 05:54:16 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id po3si1500280vdb.22.2015.02.18.05.54.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 18 Feb 2015 05:54:16 -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 1YO53R-0005ui-C8; Wed, 18 Feb 2015 13:52:41 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YO53Q-0005tl-Fu for xen-devel@lists.xenproject.org; Wed, 18 Feb 2015 13:52:40 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id 68/3E-31919-72994E45; Wed, 18 Feb 2015 13:52:39 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-16.tower-27.messagelabs.com!1424267558!8803115!1 X-Originating-IP: [74.125.82.54] 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 3299 invoked from network); 18 Feb 2015 13:52:38 -0000 Received: from mail-wg0-f54.google.com (HELO mail-wg0-f54.google.com) (74.125.82.54) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 18 Feb 2015 13:52:38 -0000 Received: by mail-wg0-f54.google.com with SMTP id y19so1195686wgg.13 for ; Wed, 18 Feb 2015 05:52:38 -0800 (PST) X-Received: by 10.180.97.67 with SMTP id dy3mr198061wib.65.1424267558571; Wed, 18 Feb 2015 05:52:38 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id fo15sm29568440wic.19.2015.02.18.05.52.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Feb 2015 05:52:37 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com, linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com Date: Wed, 18 Feb 2015 13:51:53 +0000 Message-Id: <1424267513-15836-4-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1424267513-15836-1-git-send-email-julien.grall@linaro.org> References: <1424267513-15836-1-git-send-email-julien.grall@linaro.org> Cc: tim@xen.org, ian.campbell@citrix.com, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Subject: [Xen-devel] [PATCH v2 3/3] 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: julien.grall@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.54 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: From: Ard Biesheuvel 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 1660432..904bd2d 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)