Message ID | 1426793399-6283-31-git-send-email-julien.grall@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCI3N6FH3YJRBO6IVSUAKGQEJMJK6RA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 94F5E21515 for <linaro@patches.linaro.org>; Thu, 19 Mar 2015 19:32:12 +0000 (UTC) Received: by wesq59 with SMTP id q59sf14144243wes.1 for <linaro@patches.linaro.org>; Thu, 19 Mar 2015 12:32:11 -0700 (PDT) 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=qIZyIXoAB1dXZSPE3YARH6ks5kyVvWWuo0GsG/vpFRI=; b=nDYeGxnQ+JVh2dralU+KvJC16ofJwAd64WT7zC7Um/d32hbFxstkiIqfENfZlvUoSj nlkSM4uJmt28YheEwq7exZblE9LvqbfFQhhq7z5trV9X0kSyNeZ9SBFnEsFKblrc5euK +lAfeCJShqua0LEJre3KGDAXDINYX4lsLCX7qQyOo4+T14BA+sTCgSIRj5wwWb3KuUph PgsBAYYawMtA+gmC7rOWAuSZ1m3s+dqLLHZghxcZtVrhho7kO/v8S+cnvQ7bN1rwzicE zF2rhivWUro2FZS+nDTZHWSgOWBAsyLO1L6fEN01C/1tVtVOBFjuc0L03hPdgAo1qA0A zOAA== X-Gm-Message-State: ALoCoQn8unLuZnsoVRvBqyvYmDcDboygqmyewyX78m3cKTCeK2KWB7j0w5KtPEmcL6fCQCwcE0ec X-Received: by 10.112.202.227 with SMTP id kl3mr5677964lbc.2.1426793531874; Thu, 19 Mar 2015 12:32:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.245.4 with SMTP id xk4ls217045lac.77.gmail; Thu, 19 Mar 2015 12:32:11 -0700 (PDT) X-Received: by 10.112.12.134 with SMTP id y6mr71258143lbb.34.1426793531476; Thu, 19 Mar 2015 12:32:11 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id z9si1610328lbw.159.2015.03.19.12.32.11 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 12:32:11 -0700 (PDT) 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 ladw1 with SMTP id w1so70582802lad.0 for <patchwork-forward@linaro.org>; Thu, 19 Mar 2015 12:32:11 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr68849196lbc.117.1426793531381; Thu, 19 Mar 2015 12:32:11 -0700 (PDT) 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 h5csp597440lbj; Thu, 19 Mar 2015 12:32:10 -0700 (PDT) X-Received: by 10.53.4.39 with SMTP id cb7mr80132210vdd.37.1426793527922; Thu, 19 Mar 2015 12:32:07 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id e19si1941792vdu.88.2015.03.19.12.32.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 12:32:07 -0700 (PDT) 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 <xen-devel-bounces@lists.xen.org>) id 1YYgAB-0005WI-W3; Thu, 19 Mar 2015 19:31:27 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from <julien.grall@linaro.org>) id 1YYgA9-0005P4-N8 for xen-devel@lists.xenproject.org; Thu, 19 Mar 2015 19:31:25 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id DD/00-24916-C042B055; Thu, 19 Mar 2015 19:31:24 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-4.tower-206.messagelabs.com!1426793482!11990069!1 X-Originating-IP: [74.125.82.46] 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 14237 invoked from network); 19 Mar 2015 19:31:22 -0000 Received: from mail-wg0-f46.google.com (HELO mail-wg0-f46.google.com) (74.125.82.46) by server-4.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 19 Mar 2015 19:31:22 -0000 Received: by wgbcc7 with SMTP id cc7so71245150wgb.0 for <xen-devel@lists.xenproject.org>; Thu, 19 Mar 2015 12:31:22 -0700 (PDT) X-Received: by 10.180.93.165 with SMTP id cv5mr18304125wib.51.1426793482499; Thu, 19 Mar 2015 12:31:22 -0700 (PDT) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id hl8sm3203005wjb.38.2015.03.19.12.31.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:31:21 -0700 (PDT) From: Julien Grall <julien.grall@linaro.org> To: xen-devel@lists.xenproject.org Date: Thu, 19 Mar 2015 19:29:56 +0000 Message-Id: <1426793399-6283-31-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> Cc: Wei Liu <wei.liu2@citrix.com>, ian.campbell@citrix.com, tim@xen.org, Julien Grall <julien.grall@linaro.org>, Ian Jackson <ian.jackson@eu.citrix.com>, stefano.stabellini@citrix.com Subject: [Xen-devel] [PATCH v4 30/33] tools/libxl: arm: Use an higher value for the GIC phandle X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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.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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> |
diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 54d197b..0723a47 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -80,10 +80,11 @@ static struct arch_info { {"xen-3.0-aarch64", "arm,armv8-timer", "arm,armv8" }, }; -enum { - PHANDLE_NONE = 0, - PHANDLE_GIC, -}; +/* + * The device tree compiler (DTC) is allocating the phandle from 1 to + * onwards. Reserve a high value for the GIC phandle. + */ +#define PHANDLE_GIC (65000) typedef uint32_t be32; typedef be32 gic_interrupt[3];
The partial device tree may contains phandle. The Device Tree Compiler tends to allocate the phandle from 1. Reserve the ID 65000 for the GIC phandle. I think we can safely assume that the partial device tree will never contain a such ID. Signed-off-by: Julien Grall <julien.grall@linaro.org> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> --- It's not easily possible to track the maximum phandle in the partial device tree. We would need to parse it twice: one for looking the maximum phandle, and one for copying the nodes. This is because we have to know the phandle of the GIC when we create the properties of the root. As the phandle is encoded an unsigned 32 bits, I could use an higher value. Though, having 65000 phandle is already a lot... TODO: If it's necessary, I can check if the value has been used by another phandle in the device tree. Changes in v3: - Patch added --- tools/libxl/libxl_arm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)