From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 07/29] xen/arm: Create a hierarchical device tree Date: Mon, 29 Apr 2013 16:32:32 +0100 Message-ID: <517E9290.3000706@linaro.org> References: <1367248761.3142.338.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1367248761.3142.338.camel@zakaz.uk.xensource.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 Cc: Anthony Perard , "patches@linaro.org" , Stefano Stabellini , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 04/29/2013 04:19 PM, Ian Campbell wrote: > On Mon, 2013-04-29 at 00:01 +0100, Julien Grall wrote: >> Add function to parse the device tree and create a hierarchical tree. >> >> This code is based on drivers/of/base.c in linux source. > > Do I understand correctly that most of the complex changes here are > pre-existing Linux code imported into Xen? It informs how much review > effort I will give it before I just give in and Ack it ;-) Yes. It's the same for patches 8, 9 and 10. I have just reindent the code and use xen internal functions. >> + np = unflatten_dt_alloc(&mem, sizeof(struct dt_device_node) + allocl, >> + __alignof__(struct dt_device_node)); >> + if ( allnextpp ) >> + { >> + memset(np, 0, sizeof(*np)); >> + np->full_name = ((char *)np) + sizeof(struct dt_device_node); >> + /* By default dom0 owns the dom0 */ > > Is the second dom0 supposed to be something else? it's "device" :). I will fix it. >> + np->used_by = 0; > >> +struct dt_property { >> + const char *name; >> + u32 length; >> + void *value; >> + struct dt_property *next; >> +}; >> + >> +#define DT_USED_BY_XEN DOMID_INVALID > > There is already a DOMID_XEN which you could use. > > Ian. >