From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/8] xen/arm: Retrieve the correct number of cells when building dom0 DT Date: Mon, 28 Sep 2015 16:19:23 +0100 Message-ID: <1443453563.25250.272.camel@citrix.com> References: <1442944062-4324-1-git-send-email-julien.grall@citrix.com> <1442944062-4324-3-git-send-email-julien.grall@citrix.com> <1443196906.25250.179.camel@citrix.com> <560955B8.3050202@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZgaD9-00058W-B3 for xen-devel@lists.xenproject.org; Mon, 28 Sep 2015 15:19:27 +0000 In-Reply-To: <560955B8.3050202@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: Julien Grall , xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2015-09-28 at 15:59 +0100, Julien Grall wrote: > Hi Ian, > > On 25/09/15 17:01, Ian Campbell wrote: > > On Tue, 2015-09-22 at 18:47 +0100, Julien Grall wrote: > > > The function dt_n_*_cells will retrieve the number of cells for a > > > given > > > node. Those numbers may not be correct to use for the child "reg" > > > property if the parent is passed. > > > > I think a clearer way to express this is that the functions return the > > number of cells to use for a reg property in the given node, and so > > they > > will naturally not necessarily return the right number if you give them > > some other node (whether that's the parent or some other node > > entirely). > > I will rework this part into: > > "The function dt_n_*_cells return the number of cells to use for a reg > property in a given node. So those numbers won't be correct if the > parent of a give node is passed." ^n > > > > > > This is fine today because the parent is always the root node which > > > means there is no upper parent. > > > > > > Introduce new helpers dt_child_n_*_cells to retrieve the number of > > > cells for the address and size that can be used to create the "reg" > > > property of a child of a given parent. > > > > "of the immediate child of a given" > > > > maybe? > > I'm not sure to see why "immediate" is necessary here. A child is always > immediate, otherwise it would be grandchild or else. Sadly it's not as unambiguous as that in this kind of context, child could be taken to mean "somewhere below". Ian.