From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 2/7] xen/arm: Retrieve the correct number of cells when building dom0 DT Date: Thu, 1 Oct 2015 12:57:26 +0100 Message-ID: <1443700646.11707.22.camel@citrix.com> References: <1443543701-18389-1-git-send-email-julien.grall@citrix.com> <1443543701-18389-3-git-send-email-julien.grall@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 1ZhcUM-0002na-86 for xen-devel@lists.xenproject.org; Thu, 01 Oct 2015 11:57:30 +0000 In-Reply-To: <1443543701-18389-3-git-send-email-julien.grall@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 Tue, 2015-09-29 at 17:21 +0100, Julien Grall wrote: > The functions dt_n_*_cells return the number of cells for a "reg" > property of a given node. So those numbers won't be correct if the > parent of a given node is passed. > > 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 the immediate child of a given parent. Also introduce > dt_child_set_range to pair up with dt_child_n_*_cells. > > Use the new helpers when creating the hypervisor and memory node where > we only have the parent in hand. This is because those nodes are created > from scratch by Xen and therefore we don't have a dt_device_node for > them. The only thing we have is a pointer to their future parent. > > Signed-off-by: Julien Grall Acked-by: Ian Campbell