From patchwork Thu Apr 9 15:09:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 46975 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9A3421416 for ; Thu, 9 Apr 2015 15:22:48 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf27173351lbb.0 for ; Thu, 09 Apr 2015 08:22:47 -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:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=W5fFN3+KvUTp783OY7cGUJbSB74ItjVv3KjyMXVmUvY=; b=PMnno/Wq8iA+T27orPMAyqesuSqccsfjcr0wGcUmnVcqp4NUvJw9qlN0NlFYG3XHA7 8VWKHJ1wgGFfPVo4kHLzDY+cODhk3S1wqW8YXIF+seHhq1d9bi6ZL8SwmHZdPCAUjYTo 8ZWZUKrCeZ6Rlezv3v9SrgWstA4qxXyfYWPya51+JBThakBIh40dEHu8iEKRZOTRo6Z3 mW1zKBs/kztjAfLql8AGshhdRtUdeCeaIw5o+Pa5bCnqMoVdEJNR4WgrDJlbwHkduj4u MC+GVeqKMn8aVTgowF5dT+UfYQoui4bTAWT/JudcO61r5zPeimpLM6GImuqsMNughnOQ EgUQ== X-Gm-Message-State: ALoCoQnT9tmBK5iuC3V1bSZaL2cbsb2iVBoJ1tvoAMNW8GkABW2CGQJgCG+Ym020jcdITufTwH+n X-Received: by 10.112.29.39 with SMTP id g7mr5911086lbh.1.1428592967858; Thu, 09 Apr 2015 08:22:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.70 with SMTP id 6ls306025las.14.gmail; Thu, 09 Apr 2015 08:22:47 -0700 (PDT) X-Received: by 10.112.72.132 with SMTP id d4mr10489773lbv.1.1428592967658; Thu, 09 Apr 2015 08:22:47 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id jh6si11690883lbc.102.2015.04.09.08.22.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 08:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by laat2 with SMTP id t2so85066743laa.1 for ; Thu, 09 Apr 2015 08:22:47 -0700 (PDT) X-Received: by 10.112.125.167 with SMTP id mr7mr28701499lbb.106.1428592967569; Thu, 09 Apr 2015 08:22:47 -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.67.65 with SMTP id l1csp537855lbt; Thu, 9 Apr 2015 08:22:46 -0700 (PDT) X-Received: by 10.140.165.198 with SMTP id l189mr38384206qhl.93.1428592955234; Thu, 09 Apr 2015 08:22:35 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 72si14649954qhx.34.2015.04.09.08.22.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 09 Apr 2015 08:22:35 -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 ) id 1YgEH5-0003Tf-Br; Thu, 09 Apr 2015 15:21:47 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YgEH3-0003Rt-SL for xen-devel@lists.xenproject.org; Thu, 09 Apr 2015 15:21:45 +0000 Received: from [193.109.254.147] by server-1.bemta-14.messagelabs.com id 6F/FB-09816-90996255; Thu, 09 Apr 2015 15:21:45 +0000 X-Env-Sender: julien.grall@citrix.com X-Msg-Ref: server-5.tower-27.messagelabs.com!1428592902!12096434!2 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 6.13.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13243 invoked from network); 9 Apr 2015 15:21:44 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-5.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 9 Apr 2015 15:21:44 -0000 X-IronPort-AV: E=Sophos;i="5.11,550,1422921600"; d="scan'208";a="253569434" From: Julien Grall To: Date: Thu, 9 Apr 2015 16:09:42 +0100 Message-ID: <1428592185-18581-17-git-send-email-julien.grall@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1428592185-18581-1-git-send-email-julien.grall@citrix.com> References: <1428592185-18581-1-git-send-email-julien.grall@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Wei Liu , ian.campbell@citrix.com, tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com Subject: [Xen-devel] [PATCH v5 p2 16/19] 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: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , 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: patch@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.50 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: Julien Grall 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 Acked-by: Ian Campbell Cc: Ian Jackson Cc: Wei Liu --- To allocate dynamically the phandle, we would need to fill in post-hoc (like we do with e.g the initramfs location) the #interrupt-parent in "/". That would also require some refactoring in the code to pass the phandle every time. Defer this solution to a follow-up in order as having 65000 would be very unlikely. Changes in v5: - Add Ian's Ack. Changes in v3: - Patch added --- tools/libxl/libxl_arm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 2ce7e23..cf1379d 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];