[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 03/15] xen: arm: allocate dom0 memory separately from preparing the dtb



On Thu, 2013-10-10 at 15:38 +0100, Julien Grall wrote:

> This function always return 0 or panic if an error occurred. Perhaps you
> can move the return type to void?

Yes, done all the way up the call chain.

> >      if ( platform_has_quirk(PLATFORM_QUIRK_DOM0_MAPPING_11) )
> > -        return set_memory_reg_11(d, kinfo, pp, np, new_cell);
> > +        return allocate_memory_11(d, kinfo);
> > +
> > +    memory = dt_find_node_by_type(NULL, "memory");
> 
> Can we try to have the same way to retrieve the memory node in each place?

Hrm. The first one (device_tree.c) is using the early stuff while the
other two are using the full datastructures.

But for the last two I think the right thing to do is to check for
device_type = "memory".

> - common/device_tree.c: looking by memory@unit
> - arch/arm/domain_build.c:write_properties: looking only the exact node
> name "memory"
> - here: looking by type "memory"
> 
> Furthermore, your are assuming that there is only one memory node in DTS
> tree. Perhaps a loop is better here?

Yes, I'll change that.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.