From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>,
Jon Medhurst <tixy@linaro.org>,
Dave Martin <dave.martin@linaro.org>,
Andrew Lunn <andrew@lunn.ch>, Tony Lindgren <tony@atomide.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linus Walleij <linus.walleij@linaro.org>,
Sekhar Nori <nsekhar@ti.com>,
Grant Likely <grant.likely@secretlab.ca>,
Viresh Kumar <viresh.kumar@linaro.org>,
Mark Rutland <Mark.Rutland@arm.com>,
Lennert Buytenhek <kernel@wantstofly.org>,
Kukjin Kim <kgene.kim@samsung.com>,
Russell King <linux@arm.linux.org.uk>,
Magnus Damm <magnus.damm@gmail.com>,
Catalin Marinas <Catalin.Marinas@arm.com>,
David Brown <davidb@codeaurora.org>,
Dinh Nguyen <dinguyen@altera.com>, Arnd Bergmann <arnd@arndb.de>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
Simon Horman <horms@verge.net.au>
Subject: Re: [RFC PATCH 2/2] ARM: DT: kernel: DT cpu node bindings update
Date: Tue, 16 Apr 2013 11:45:45 +0100 [thread overview]
Message-ID: <20130416104545.GA19837@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <516C544A.4090107@wwwdotorg.org>
Thanks Stephen for the review.
On Mon, Apr 15, 2013 at 08:26:02PM +0100, Stephen Warren wrote:
> On 04/15/2013 10:13 AM, Lorenzo Pieralisi wrote:
> > In order to extend the current cpu nodes bindings to newer CPUs
> > inclusive of AArch64 and to update support for older ARM CPUs this
> > patch updates device tree documentation for the cpu nodes bindings.
> >
>
> > diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
>
> > http://devicetree.org
> >
> > -For the ARM architecture every CPU node must contain the following properties:
> > -
> ...
> > +with updates for 32-bit and 64-bit ARM systems provided in this document.
> > +
> > +In the bindings below:
>
> That's a slightly odd change, since it removes the statement that a cpus
> node must exist, and "in the bindings below" is not idiomatic for DT
> binding definitions.
I beg to differ.
"Bindings for CPU nodes follow the ePAPR standard...."
ePAPR v1.1
3.6 CPUS node properties
"A cpus node is required for all device trees".
> Perhaps replace that last list with:
>
> The ARM architecture requires the following properties in the cpus and
> cpu nodes contain the properties described below.
>
> > +- square brackets define bitfields, eg reg[7:0] value of the bitfield in
> > + the reg property contained in bits 7 down to 0
>
> Isn't that standard enough it's not even worth mentioning? If it is,
> it's certainly not something that should be mentioned in the part of the
> document that describes which properties are requried.
It is mentioned before cpus node and cpu node descriptions start.
I think you have a point though and it can be omitted, I certainly would
like to understand better what's "standard enough" in DT world to write
these bindings, I took ePAPR as a reference and tried to assume nothing.
>
> > + - #address-cells
> > + Usage: required
>
> "Usage" sounds more like what it's used for. "Presence" seems better to me.
I have not reinvented the wheel, just had a look at powerPC bindings and
tried to comply. If "Usage" is not proper we also have to patch a number
of in-kernel DT bindings and update the ePAPR.
> > + # On ARM architecture versions >= 7 based 32-bit
> > + systems this property is required and matches the
>
> Perhaps "On 32-bit ARMv7 or later systems, this property ..."
>
> > + # On ARM v8 64-bit systems, where the reg property
>
> Should there be an explicit note here re: 32-bit SW running on a 64-bit
> system?
Yes, I think I should add an explicit note.
> Perhaps "on ARMv8 systems running 32-bit or 64- bit software, the reg
> property ..."
>
> > + is made up of two cells to accomodate the 64-bit
> > + MPDIR_EL1 register this property is required and
> > + matches:
>
> s/matches/must contain/
Ok, I will reword it.
> > + - enable-method
> > + Usage: required on ARM 64-bit systems, optional on ARM 32-bit
> > + systems
> > + Value type: <string>
> > + Definition: On ARM 64-bit systems must be "spin-table" [1].
>
> Can that be an integer instead? with dtc+cpp support, that shouldn't
> hurt the eyes too much any more.
Mmm, I need to read more on dtc+cpp, I do not think that leaving it
as a string would hurt though, am I wrong ? Can we assume that all dts
are preprocessed before being compiled and passed to the kernel ?
I need to catch up on dtc+cpp before commenting further though, thanks
for the hint.
> > + - cpu-release-addr
> > + Usage: required on ARM 64-bit systems, optional on ARM 32-bit
> > + systems
> > + Value type: <prop-encoded-array>
> > + Definition: On ARM 64-bit systems must be a two cell
> > + property identifying a 64-bit zero-initialised
> > + memory location [1].
>
> Presumably that property is required, or not, based on the value of
> enable-method, not based on the ARM architecture or bit-size?
Yes, you have a point even though the bit-size implicitly plays a role
since we have to decouple 32-bit vs 64-bit boot methods.
> > +[1] ARM Linux kernel documentation
> > + Documentation/devicetree/bindings/arm64/booting.txt
>
> Is referencing Linux-specific documentation from a supposedly
> OS-agnostic DT binding definition a good idea?
Well, an OS-agnostic DT binding definition in the Linux kernel Documentation
directory. I would like to hear more on this to understand where these
bindings should be published, for now I have no choice but to point
people at Linux kernel documentation (and the ePAPR does too BTW, even
though it is not for explicit bindings).
Thank you !
Lorenzo
next prev parent reply other threads:[~2013-04-16 10:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 16:13 [RFC PATCH 0/2] ARM: DT cpu bindings updates Lorenzo Pieralisi
2013-04-15 16:13 ` [RFC PATCH 1/2] ARM: DT: kernel: move temporary cpu map stack array to static data Lorenzo Pieralisi
[not found] ` <1366042402-8987-1-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-04-15 16:13 ` [RFC PATCH 2/2] ARM: DT: kernel: DT cpu node bindings update Lorenzo Pieralisi
[not found] ` <1366042402-8987-3-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-04-15 19:26 ` Stephen Warren
2013-04-16 10:45 ` Lorenzo Pieralisi [this message]
[not found] ` <20130416104545.GA19837-7AyDDHkRsp3ZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-04-16 15:57 ` Stephen Warren
2013-04-16 16:21 ` Benjamin Herrenschmidt
[not found] ` <516C544A.4090107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-16 14:30 ` Dave Martin
2013-04-17 9:14 ` Mark Rutland
[not found] ` <20130417091457.GB5012-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-04-17 15:14 ` Stephen Warren
2013-04-17 16:02 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.03.1304171146530.17375-hIgblCxmbi8OMTOF05IoTw@public.gmane.org>
2013-04-17 16:23 ` Stephen Warren
[not found] ` <516ECC8A.2070508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-17 16:36 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.03.1304171231130.17375-hIgblCxmbi8OMTOF05IoTw@public.gmane.org>
2013-04-17 16:56 ` Dave Martin
2013-04-17 16:24 ` Benjamin Herrenschmidt
[not found] ` <516EBC66.20508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-18 12:40 ` Grant Likely
2013-04-16 2:41 ` Simon Horman
2013-04-16 11:00 ` Lorenzo Pieralisi
2013-04-17 9:35 ` Nicolas Ferre
2013-04-17 11:44 ` Lorenzo Pieralisi
2013-04-17 9:48 ` Arnd Bergmann
2013-04-17 11:02 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130416104545.GA19837@e102568-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=Catalin.Marinas@arm.com \
--cc=Mark.Rutland@arm.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=dave.martin@linaro.org \
--cc=davidb@codeaurora.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dinguyen@altera.com \
--cc=grant.likely@secretlab.ca \
--cc=horms@verge.net.au \
--cc=kernel@wantstofly.org \
--cc=kgene.kim@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux@arm.linux.org.uk \
--cc=magnus.damm@gmail.com \
--cc=nicolas.pitre@linaro.org \
--cc=nsekhar@ti.com \
--cc=rob.herring@calxeda.com \
--cc=swarren@wwwdotorg.org \
--cc=tixy@linaro.org \
--cc=tony@atomide.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).