From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 30/33] tools/libxl: arm: Use an higher value for the GIC phandle Date: Thu, 9 Apr 2015 13:36:50 +0100 Message-ID: <55267262.9090503@citrix.com> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> <1426793399-6283-31-git-send-email-julien.grall@linaro.org> <1427802194.2115.96.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YgBiA-0007fM-4Y for xen-devel@lists.xenproject.org; Thu, 09 Apr 2015 12:37:34 +0000 In-Reply-To: <1427802194.2115.96.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , 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 Hi Ian, On 31/03/15 12:43, Ian Campbell wrote: > 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? That would work. I will see for a follow-up of this patch series. > 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. I would prefer to postpone and replace with a follow-up to allocate dynamically the phandle. Regards, -- Julien Grall