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

Re: [Xen-devel] [PATCH 2/8] xen/arm: Retrieve the correct number of cells when building dom0 DT



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."

> 
>> 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.

> 
>>
>> 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
>> recreated from scratch by Xen and therefore we don't have a
> 
> s/re//
> 
>> dt_device_node for them. The only thing we have is a pointer to there
> 
> "their"
> 
>> future parent.
>>
>> We also have to modify dt_set_range to take a parent in parameter rather
>> than an HW DT node that we will replicated in the DOM0 DT.
> 
> "replicate".
> 
> But here I'd rather leave dt_set_range alone to remain analogous to
> dt_n_*_cells. Can you instead do as you did for dt_n_*_cells please and
> create a new dt_set_child_range or dt_child_set_range or whatever?

I will introduce dt_child_set_range.

Regards,

-- 
Julien Grall

_______________________________________________
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®.