[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqLWUSCJMU5LMz8X_0gU74YNy6-vRXGvY24ZpVj+EZW-sA@mail.gmail.com>
Date: Fri, 8 Nov 2024 11:24:36 -0600
From: Rob Herring <robh@...nel.org>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Saravana Kannan <saravanak@...gle.com>, Bjorn Helgaas <bhelgaas@...gle.com>,
Lizhi Hou <lizhi.hou@....com>, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-pci@...r.kernel.org,
Allan Nielsen <allan.nielsen@...rochip.com>, Horatiu Vultur <horatiu.vultur@...rochip.com>,
Steen Hegelund <steen.hegelund@...rochip.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v2 5/6] of: Add #address-cells/#size-cells in the
device-tree root empty node
On Fri, Nov 8, 2024 at 10:29 AM Herve Codina <herve.codina@...tlin.com> wrote:
>
> Hi Rob,
>
> On Fri, 8 Nov 2024 10:03:31 -0600
> Rob Herring <robh@...nel.org> wrote:
>
> > On Fri, Nov 8, 2024 at 8:36 AM Herve Codina <herve.codina@...tlin.com> wrote:
> > >
> > > On systems where ACPI is enabled or when a device-tree is not passed to
> > > the kernel by the bootloader, a device-tree root empty node is created.
> > > This device-tree root empty node doesn't have the #address-cells and the
> > > + /*
> > > + * #address-cells/#size-cells are required properties at root node
> > > + * according to the devicetree specification. Use same values as default
> > > + * values mentioned for #address-cells/#size-cells properties.
> >
> > Which default? We have multiple...
>
> I will reword:
> Use values mentioned in the devicetree specification as default values
> for #address-cells and #size-cells properties
My point was that "default" is meaningless because there are multiple
sources of what's default.
> >
> > There's also dtc's idea of default which IIRC is 2 and 1 like OpenFirmware.
>
> I can re-add this part in the commit log:
> The device tree compiler already uses 2 as default value for address cells
> and 1 for size cells. The powerpc PROM code also use 2 as default value
> for #address-cells and 1 for #size-cells. Modern implementation should
> have the #address-cells and the #size-cells properties set and should
> not rely on default values.
>
> In your opinion, does it make sense?
>
> >
> > > + */
> > > + #address-cells = <0x02>;
> > > + #size-cells = <0x01>;
> >
> > I think we should just do 2 cells for size.
>
> Why using 2 for #size-cells?
>
> I understand that allows to have size defined on 64bits but is that needed?
> How to justify this value here?
Most systems are 64-bit today. And *all* ACPI based systems are. Not
that the DT has to match 32 vs 64 bit CPU, most of the time it does.
It also doesn't actually change anything for you because you're going
to have "pci" nodes and the "ranges" there takes #size-cells from the
pci node, not the parent.
Rob
Powered by blists - more mailing lists