From patchwork Fri Jan 30 13:58:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44044 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BB0422410D for ; Fri, 30 Jan 2015 14:00:46 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf1698765lbj.0 for ; Fri, 30 Jan 2015 06:00:44 -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=21Vqewp14r1xnrCQLkMvHMhrNdN7sD6IsmGd8XKw0/0=; b=ERqJDzN4N8C1mGB+2DabyHxWPcd/d4e58cBAjPqLcPNDrR3cNrU8YbvwAqhQbsfz+R ryKdFPmoswPPvK51y76zbj1jdjUKWM7qzQaKuSPvJoXRryp0IOTdnD8nHMzMJlA09UYQ BlY9maqU2l80YVQSIe2gfFLWKJK53aUe8LYhXuwhq+invW4Dpxj+D9Bfe4nq/f4O33hp +myM+Accocbe9Ngi5cSNaEoTPZTQUHN0mEpa12Q3JDYYyGkTLPmw4D/bmPC5TtZTUvUH VaNdz1j9v9W0W0n7CPhCXjNw5ie+ys5pXbEUD5l8OpwBGqlIlrAzHMsdYmIHTrLG84ZA eDug== X-Gm-Message-State: ALoCoQkYisMlIwaRgb7mHaAY5VQNRkZS6PxtE3owvvlK+ft9DABsA+GtGU7m3flChJCrrXq4j9Db X-Received: by 10.112.124.142 with SMTP id mi14mr81805lbb.1.1422626444722; Fri, 30 Jan 2015 06:00:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.134 with SMTP id kq6ls403591lac.36.gmail; Fri, 30 Jan 2015 06:00:44 -0800 (PST) X-Received: by 10.152.22.129 with SMTP id d1mr6604716laf.22.1422626444570; Fri, 30 Jan 2015 06:00:44 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id t1si10135785lag.91.2015.01.30.06.00.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 06:00:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id s18so23871451lam.3 for ; Fri, 30 Jan 2015 06:00:44 -0800 (PST) X-Received: by 10.152.219.37 with SMTP id pl5mr2388538lac.6.1422626444389; Fri, 30 Jan 2015 06:00:44 -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 h5csp293167lbj; Fri, 30 Jan 2015 06:00:43 -0800 (PST) X-Received: by 10.220.119.80 with SMTP id y16mr3081069vcq.51.1422626443506; Fri, 30 Jan 2015 06:00:43 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id f11si5026515vdg.34.2015.01.30.06.00.42 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 30 Jan 2015 06:00:43 -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 1YHC5x-0006Dk-Kx; Fri, 30 Jan 2015 13:58:49 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YHC5w-0006Df-8I for xen-devel@lists.xen.org; Fri, 30 Jan 2015 13:58:48 +0000 Received: from [85.158.143.35] by server-3.bemta-4.messagelabs.com id 48/45-02754-71E8BC45; Fri, 30 Jan 2015 13:58:47 +0000 X-Env-Sender: ard.biesheuvel@linaro.org X-Msg-Ref: server-15.tower-21.messagelabs.com!1422626326!13515093!1 X-Originating-IP: [209.85.212.175] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13536 invoked from network); 30 Jan 2015 13:58:47 -0000 Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by server-15.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jan 2015 13:58:47 -0000 Received: by mail-wi0-f175.google.com with SMTP id fb4so3248212wid.2 for ; Fri, 30 Jan 2015 05:58:46 -0800 (PST) X-Received: by 10.194.22.36 with SMTP id a4mr12369127wjf.54.1422626326682; Fri, 30 Jan 2015 05:58:46 -0800 (PST) Received: from ards-macbook-pro.local ([197.130.213.35]) by mx.google.com with ESMTPSA id ud4sm7077000wib.0.2015.01.30.05.58.44 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 05:58:45 -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: Fri, 30 Jan 2015 13:58:39 +0000 Message-Id: <1422626319-30752-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] 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.44 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 --- 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 #include #include +#include #include @@ -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);