From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 30/33] tools/libxl: arm: Use an higher value for the GIC phandle Date: Tue, 31 Mar 2015 12:43:14 +0100 Message-ID: <1427802194.2115.96.camel@citrix.com> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> <1426793399-6283-31-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YcuZj-0003uv-VL for xen-devel@lists.xenproject.org; Tue, 31 Mar 2015 11:43:20 +0000 In-Reply-To: <1426793399-6283-31-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, Wei Liu List-Id: xen-devel@lists.xenproject.org On Thu, 2015-03-19 at 19:29 +0000, Julien Grall wrote: > 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 > Cc: Ian Jackson > Cc: Wei Liu > > --- > 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. Or you could fill it in post-hoc like we do with e.g. the initramfs location? Anyway, this'll do for now: Acked-by: Ian Campbell > > 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. If that's easy enough to add then yes please, but if it is complex then don't bother. Ian.