From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH V1 16/29] xen/arm: Build DOM0 FDT by browsing the device tree structure Date: Tue, 10 Sep 2013 11:51:10 +0100 Message-ID: <522EF99E.5060403@linaro.org> References: <1377701263-3319-1-git-send-email-julien.grall@linaro.org> <1377701263-3319-17-git-send-email-julien.grall@linaro.org> <1378726404.19967.67.camel@kazak.uk.xensource.com> <522DBE86.4070607@linaro.org> <1378730395.19967.110.camel@kazak.uk.xensource.com> <522E433E.9070609@linaro.org> <1378803533.21748.27.camel@kazak.uk.xensource.com> <522EF6EA.4050203@linaro.org> <1378810028.21748.92.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1378810028.21748.92.camel@kazak.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: stefano.stabellini@eu.citrix.com, andre.przywara@linaro.org, patches@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 09/10/2013 11:47 AM, Ian Campbell wrote: > On Tue, 2013-09-10 at 11:39 +0100, Julien Grall wrote: >> On 09/10/2013 09:58 AM, Ian Campbell wrote: >>> On Mon, 2013-09-09 at 22:53 +0100, Julien Grall wrote: >>> >>>>>>> >>>>>>> This comment is saying that the name of the name property used to be >>>>>>> something else? What was it? Which version of FDT was that -- do we need >>>>>>> to care? >>>>>> >>>>>> Right, on older FDT version (< 0x10) each node has 2 different name: >>>>>> - the name just after FDT_BEGIN_NODE in the fdt which correspond to >>>>>> the "filename". >>>>>> - the name in property "name" which is a convenient name. >>>>>> >>>>>> So we can't use the name field in device tree to retrieve the name to >>>>>> create the node. >>>>>> >>>>>> For the FDT version, I don't know if we need to care. Linux pays >>>>>> attention to it in the device tree code. >>>>> >>>>> I'm not sure we need to care either, I expect we will never see <0x10 in >>>>> our uses (they are probbaly burnt into the ROMs of PPC machines) but of >>>>> it is easy enough to so we might as well I guess? >>>> >>>> I forgot that there is another issue, the ePAR describes the name has >>>> node-name@unit-address. The name field will contains node-name and not >>>> the full node name. >>>> >>>> Lets say Xen only uses the field name (ie node-name) to create the FDT >>>> node name. We Linux will create the procfs for the device tree >>>> (/proc/devicetree), it's possible to have numerous warning because there >>>> is 2 nodes with the same name. >>> >>> Yes, we need to avoid that. Isn't there a full_name field or something? >> >> The full_name field contains the full path to this node, for instance >> /cpus/cpu@0. So we can retrieve the node-name@unit-address with a >> basename-like function. > > Bit of a shame to have to jump through such hoop, but OK. > > Do we keep the unit-address in the datastructure? No because the unit-address is optional and is equal to the first address of the property "reg". -- Julien Grall