From: Dave Martin <Dave.Martin@arm.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>,
Jon Medhurst <tixy@linaro.org>,
Dave Martin <dave.martin@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Andrew Lunn <andrew@lunn.ch>, Tony Lindgren <tony@atomide.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linus Walleij <linus.walleij@linaro.org>,
Will Deacon <will.deacon@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Lennert Buytenhek <kernel@wantstofly.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Russell King <linux@arm.linux.org.uk>,
Magnus Damm <magnus.damm@gmail.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Grant Likely <grant.likely@linaro.org>,
David Brown <davidb@codeaurora.org>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Dinh Nguyen <dinguyen@altera.com>, Arnd Bergmann <arnd@arndb.de>,
Stephen Warren <swarren@wwwdotorg.org>,
Sekhar Nori <nsekhar@ti.com>,
devicetree-discuss@l
Subject: Re: [RFC PATCH v4 03/18] Documentation: devicetree: arm: cpus/cpu nodes bindings updates
Date: Tue, 16 Jul 2013 12:25:26 +0100 [thread overview]
Message-ID: <20130716112520.GA3428@localhost.localdomain> (raw)
In-Reply-To: <CAL_JsqLANi5UoVyRMsa6XoQ+_KnmTQDfTz++shEh-dZ3FQGZaQ@mail.gmail.com>
On Fri, Jul 12, 2013 at 09:47:17AM -0500, Rob Herring wrote:
> On Fri, May 17, 2013 at 10:20 AM, Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com> 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.
>
> Sorry for the long delay on this, but I'm still not happy with the binding here.
>
> > Main changes:
> > - adds 64-bit bindings
> > - define usage of #address-cells
> > - define 32/64 dts compatibility settings
> > - defines behaviour on pre and post v7 uniprocessor systems
> > - adds ARM 11MPcore specific reg property definition
> >
> > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > ---
> > Documentation/devicetree/bindings/arm/cpus.txt | 459 ++++++++++++++++++++++---
> > 1 file changed, 412 insertions(+), 47 deletions(-)
>
> [snip]
>
> > + # On ARM v8 64-bit systems, where the reg property
> > + size can be 1 or 2 cells (as defined by cpus node's
> > + #address-cells property), this property is
> > + required and matches:
> > +
> > + - On systems running the OS in AArch32:
>
> The DTS cannot change based on 32-bit or 64-bit OS.
>
> > +
> > + * If the cpus node's #address-cells value is 2:
> > +
> > + The first reg cell must be set to 0.
> > +
> > + The second reg cell bits [23:0] must be set to
> > + bits [23:0] of MPIDR_EL1.
> > +
> > + All other bits in the reg cells must be set to 0.
> > +
> > + * If the cpus node's #address-cells value is 1:
> > +
> > + Bits [23:0] in the reg cell must be set to
> > + bits [23:0] in MPIDR_EL1.
> > +
> > + All other bits in the reg cell must be 0.
> > +
> > + - On systems running the OS in AArch64:
> > +
> > + * If the cpus node's #address-cells value is 2:
> > +
> > + The first reg cell bits [7:0] must be set to
> > + bits [39:32] of MPIDR_EL1.
> > +
> > + The second reg cell bits [23:0] must be set to
> > + bits [23:0] of MPIDR_EL1.
> > +
> > + All other bits in the reg cells must be set to 0.
> > +
> > + * If the cpus node's #address-cells value is 1:
> > +
> > + MPIDR_EL1[63:32] is 0 on all processors in the
> > + system.
>
> Your logic is backwards here. If the MPIDR_EL1[63:32] is 0, then
> #address-cells can be 1. You could say the upper bits are ignored and
> treated as 0. However, you should simplify all this and just mandate
> that #address-cells must be 2 for ARMv8 or more generally must match
> the size of the MPIDR. If we want to boot a 32-bit kernel, then the
> kernel will have to adapt to support this.
I'd support this, opting for a clean split.
Strictly speaking, it should be this:
AArch64-capable hardware: #address-cells = 2
non-AArch64-capable hardware: #address-cells = 1
The only time it is valid to have #address-cells = 1 on AArch64-capable
hardware is in an AArch32 virtual machine (in which case, the DT anyway
describes the VM and not the real hardware).
However, due to the awkwardness of defining precisely what "AArch64-
capable hardware" means in a world containing firmware and hypervisors,
it might be better (if slightly less correct) to go with:
v8 hardware: #address-cells must be 2
<=v7 hardware: #address-cells must be 1
If the firmware boots an AArch32 payload natively on AArch64-capable
v8 hardware, it's the firmware's job to ensure that non-addressable
CPUs are properly quiesced and shut down, otherwise the setup is
pretty broken -- DT can't solve that one, nor can Linux, so we shouldn't
try. Linux just needs to discard the non-addressable CPUs and maybe
print out a warning.
Cheers
---Dave
next prev parent reply other threads:[~2013-07-16 11:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-17 15:20 [RFC PATCH v4 00/18] ARM: DT cpu bindings updates Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 03/18] Documentation: devicetree: arm: cpus/cpu nodes " Lorenzo Pieralisi
[not found] ` <1368804061-4421-4-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-05-17 16:07 ` Nicolas Pitre
2013-07-12 14:47 ` Rob Herring
[not found] ` <CAL_JsqLANi5UoVyRMsa6XoQ+_KnmTQDfTz++shEh-dZ3FQGZaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-15 9:34 ` Lorenzo Pieralisi
[not found] ` <20130715093406.GC15904-7AyDDHkRsp3ZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-07-15 18:50 ` Rob Herring
[not found] ` <51E44486.7050806-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-16 9:45 ` Lorenzo Pieralisi
[not found] ` <20130716094508.GA28503-7AyDDHkRsp3ZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-07-17 3:22 ` Rob Herring
2013-07-16 11:25 ` Dave Martin [this message]
[not found] ` <1368804061-4421-1-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-05-17 15:20 ` [RFC PATCH v4 01/18] ARM: kernel: fix arm_dt_init_cpu_maps() to skip non-cpu nodes Lorenzo Pieralisi
[not found] ` <1368804061-4421-2-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-05-17 15:49 ` Nicolas Pitre
2013-05-17 16:31 ` Rob Herring
[not found] ` <CAL_JsqLdbbsBeEaUT5BcxjZnbjEiu=qsPsynxCXdgi1J=ejzTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-05-17 17:04 ` Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 02/18] ARM: kernel: fix __cpu_logical_map default initialization Lorenzo Pieralisi
[not found] ` <1368804061-4421-3-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-05-17 15:46 ` Nicolas Pitre
2013-05-17 15:20 ` [RFC PATCH v4 04/18] ARM: dts: am33xx: cpus/cpu nodes dts updates Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 05/18] ARM: dts: armada-370-xp: cpus/cpu node " Lorenzo Pieralisi
[not found] ` <1368804061-4421-6-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-05-17 17:16 ` Gregory CLEMENT
2013-05-17 15:20 ` [RFC PATCH v4 06/18] ARM: dts: at91: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 07/18] ARM: dts: exynos5440: cpus/cpu nodes " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 08/18] ARM: dts: imx: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 09/18] ARM: dts: lpc32xx: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 10/18] ARM: dts: omap: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 11/18] ARM: dts: picoxcell: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 12/18] ARM: dts: prima2: cpus/cpu node " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 13/18] ARM: dts: pxa2xx: cpus/cpu nodes " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 14/18] ARM: dts: r8a7740: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 15/18] ARM: dts: sh7372: " Lorenzo Pieralisi
2013-05-17 15:20 ` [RFC PATCH v4 16/18] ARM: dts: spear: " Lorenzo Pieralisi
2013-05-17 15:21 ` [RFC PATCH v4 17/18] ARM: dts: sunxi: " Lorenzo Pieralisi
2013-05-17 15:21 ` [RFC PATCH v4 18/18] ARM: DT: kernel: DT cpus/cpu node bindings update Lorenzo Pieralisi
[not found] ` <1368804061-4421-19-git-send-email-lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
2013-05-17 16:22 ` Nicolas Pitre
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=20130716112520.GA3428@localhost.localdomain \
--to=dave.martin@arm.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=catalin.marinas@arm.com \
--cc=dave.martin@linaro.org \
--cc=davidb@codeaurora.org \
--cc=devicetree-discuss@l \
--cc=dinguyen@altera.com \
--cc=grant.likely@linaro.org \
--cc=kernel@wantstofly.org \
--cc=linus.walleij@linaro.org \
--cc=linux@arm.linux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=nicolas.pitre@linaro.org \
--cc=nsekhar@ti.com \
--cc=plagnioj@jcrosoft.com \
--cc=robherring2@gmail.com \
--cc=swarren@wwwdotorg.org \
--cc=tixy@linaro.org \
--cc=tony@atomide.com \
--cc=viresh.kumar@linaro.org \
--cc=will.deacon@arm.com \
/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).