From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: David Gibson <david@gibson.dropbear.id.au>,
David Daney <ddaney@caviumnetworks.com>,
linux-mips@linux-mips.org, ralf@linux-mips.org,
devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Kevin Hilman <khilman@deeprootsystems.com>
Subject: Re: [RFC PATCH 02/10] MIPS: Octeon: Add device tree source files.
Date: Sat, 26 Feb 2011 08:46:22 +1100 [thread overview]
Message-ID: <1298670382.8833.693.camel@pasglop> (raw)
In-Reply-To: <AANLkTi=Oh0iu-d4n3rMLvXFH-DjS1mT3GgpoJyywjM=5@mail.gmail.com>
On Fri, 2011-02-25 at 08:22 -0700, Grant Likely wrote:
>
> Generally I've applied the argument that it's a good idea to populate
> the /cpus node as an anchor for future things that might require it.
> For example, a theoretical hypervisor which doesn't allow the guest
> access to all the CPUs would use cpu nodes to tell the OS 'hands off'.
> Or possibly more likely, and AMP scenario where Linux would certainly
> detect all the CPUs, but is supposed to leave some of them alone. It
> would also be an anchor for anything NUMA-like which is also
> theoretical, but may become more likely in some of the larger ARM
> designs that I've been hearing about.
It also allows to bring other informations in there such as clock
frequencies etc... In some kind, binding to a reset GPIO used to soft
reset secondaries (ie on Macs we have something like that)...
> Given that we've been very explicit that the device tree is for
> describing things that aren't probable, the argument that it is not
> necessary to populate the cpus node probably holds some water. If
> there are no special considerations (ie. disabled CPUs or NUMA) and
> nothing holds a phandle to a specific cpu node, then it is probably
> okay to omit. In that case the lack of /cpus node would mean simply,
> "detect the cpus", and /cpus could be populated to override the
> detected behaviour.
Well... I tend to recommend putting things that are soldered on the mobo
in the device-tree, simply because that allows to pass all sort of
additional informations that can be useful. For example, if you have a
PCI2PCI bridge on the mobo, it allows you to provide proper slot names
for the slots below it, or if devices have oddly routed interrupts (not
the standard INTA...D with swizzling), which happens on embedded a lot,
the device-tree can convey that more easily.
Other things like clock frequencies or in general clock relationships,
or even location codes, MAC addresses, etc...
But you don't -have- to. It's just a recommendation.
> Picking up on something David Daney said...
> >> The number and type of CPUs can be (and is) probed. There is an
> >> existing mechanism for the bootloader to communicate which CPUs
> >> should be used.
>
> I do get a little nervous about this (the bootloader communication
> bit). For ARM, I had an argument with Nicolas Pitre about preserving
> the existing ATAGs mechanism and adding DT on top vs. replacing ATAGs
> entirely with DT. I wanted to keep ATAGs, but Nicolas was concerned
> about how to handle ambiguity about which data to use when the ATAGs
> and DT disagree. In hindsight Nicolas was 100% right and I'm glad he
> pushed back. The ARM DT support now detects if ATAGs or a .dtb were
> passed at boot (one or the other), and it is *so* much cleaner. All
> configuration data lives in the same place and is manipulated in the
> same way. Plus it means that the dt usage model is the same for
> multiple architectures, arm, powerpc and microblaze.
I think doing a "blend" of existing bootloader channels + device-tree is
bad. The device-tree should convey all of the informations that were
previously passed using a different mechanism, or hell will freeze over
in the long run.
Cheers,
Ben.
next prev parent reply other threads:[~2011-02-25 21:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 20:57 [RFC PATCH 00/10] MIPS: Octeon: Use Device Tree David Daney
2011-02-22 20:57 ` [RFC PATCH 01/10] MIPS: Octeon: Move some Ethernet support files out of staging David Daney
2011-02-23 14:48 ` Grant Likely
2011-02-23 17:36 ` David Daney
2011-02-22 20:57 ` [RFC PATCH 02/10] MIPS: Octeon: Add device tree source files David Daney
2011-02-23 0:07 ` David Gibson
2011-02-23 14:30 ` Ralf Baechle
2011-02-23 16:59 ` David Daney
2011-02-24 23:19 ` David Gibson
2011-02-25 15:22 ` Grant Likely
2011-02-25 21:46 ` Benjamin Herrenschmidt [this message]
2011-02-23 19:06 ` David Daney
2011-02-23 23:49 ` David Gibson
2011-02-24 1:57 ` David Daney
2011-02-24 2:14 ` David Gibson
2011-02-24 2:22 ` David Daney
2011-02-22 20:57 ` [RFC PATCH 03/10] MIPS: Prune some target specific code out of prom.c David Daney
2011-02-22 20:57 ` [RFC PATCH 04/10] MIPS: Octeon: Add a irq_create_of_mapping() implementation David Daney
2011-02-22 20:57 ` [RFC PATCH 05/10] MIPS: Octeon: Rearrance CVMX files in preperation for device tree David Daney
2011-02-22 20:57 ` [RFC PATCH 06/10] MIPS: Octeon: Initialize and fixup " David Daney
2011-02-23 0:16 ` David Gibson
2011-02-23 17:41 ` Grant Likely
2011-02-23 18:40 ` David Daney
2011-02-23 18:51 ` Grant Likely
2011-02-23 19:20 ` David Daney
2011-02-22 20:57 ` [RFC PATCH 07/10] i2c: Convert i2c-octeon.c to use " David Daney
2011-02-23 16:25 ` Grant Likely
2011-02-22 20:57 ` [RFC PATCH 08/10] netdev: mdio-octeon.c: Convert " David Daney
2011-02-22 20:57 ` [RFC PATCH 09/10] netdev: octeon_mgmt: " David Daney
2011-02-23 16:32 ` Grant Likely
2011-02-23 20:33 ` David Miller
2011-02-22 20:57 ` [RFC PATCH 10/10] staging: octeon_ethernet: " David Daney
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=1298670382.8833.693.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=ddaney@caviumnetworks.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=khilman@deeprootsystems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rob.herring@calxeda.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