From: Grant Likely <grant.likely@secretlab.ca>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Rob Herring <robherring2@gmail.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Matt Porter <matt.porter@linaro.org>,
Koen Kooi <koen@dominion.thruhere.net>,
Alison Chaiken <Alison_Chaiken@mentor.com>,
Dinh Nguyen <dinh.linux@gmail.com>, Jan Lubbe <jluebbe@lasnet.de>,
Alexander Sverdlin <alexander.sverdlin@nsn.com>,
Michael Stickel <ms@mycable.de>,
Guenter Roeck <linux@roeck-us.net>,
Dirk Behme <dirk.behme@gmail.com>,
Alan Tull <delicious.quinoa@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Michael Bohan <mbohan@codeaurora.org>,
Ionut Nicu <ioan.nicu.ext@nsn.com>,
Michal Simek <monstr@monstr.eu>,
Matt Ranostay <mranostay@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pete Popov <pete.popov@konsulko.com>,
Dan Malek <dan.malek@konsulko.com>,
Georgi Vlaev <georgi.vlaev@konsulko.com>
Subject: Re: [PATCH v4 2/8] OF: Introduce DT overlay support.
Date: Tue, 20 May 2014 14:50:26 +0900 [thread overview]
Message-ID: <20140520055026.E3A98C412DA@trevor.secretlab.ca> (raw)
In-Reply-To: <CAMuHMdWw39n8O0fFWECR6v6GaEJ3aB5S3ront4eDdXwxNO6Fgw@mail.gmail.com>
On Fri, 16 May 2014 13:52:42 +0200, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> Hi Grant,
>
> On Fri, May 16, 2014 at 12:58 PM, Grant Likely
> <grant.likely@secretlab.ca> wrote:
> > On Thu, 15 May 2014 09:20:24 +0200, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >> On Thu, May 15, 2014 at 9:12 AM, Pantelis Antoniou
> >> <pantelis.antoniou@konsulko.com> wrote:
> >> >> We also need to think about kexec. Kexec works by sucking the live tree
> >> >> out of the kernel and creating a .dtb from it to pass to the new kernel.
> >> >> What will the rules be when kexecing? Do all the overlays need to be
> >> >> removed, or does the kernel get the tree with all the overlays applied
> >> >> (in which case none of the overlays can be removed on the other side of
> >> >> kexec).
> >> >
> >> > We can add a sysfs attribute that configures whether overlays are reverted before
> >> > kexec or not. I can't really tell which is the correct option, so let's allow the
> >> > policy up to user-space.
> >>
> >> Kexec'ing into a new kernel doesn't change the hardware, so IMHO the
> >> in-kernel DT should not change.
> >
> > Conceptually though, if overlays are applied then the new kernel has a
> > different tree from the old one. If the overlay is hotpluggable, then
> > after the kexec, the new kernel would no longer be able to unplug the
> > overlay if it uses the current state of the tree instead of pulling the
> > overlays off first.
>
> Which brings me to another question...
>
> Why has the overlay system been designed for plugging and unpluging whole
> overlays?
> That means the kernel has to remember the full stack, causing issues with
> e.g. kexec.
Mostly so that drivers don't see any difference in the livetree data
structure. It also means that userspace sees a single representation of
the hardware at any given time.
> Why not allowing the addition of removal of subtrees of the full device
> tree?
Overlays is more than just a subtree. A single overlay can make
manipulations of multiple subtrees that should be handled as logically
atomic.
> This is similar to other hotpluggable subsystems (which are not necessarily
> DT-based), like PCI Express. That way the kernel can pass a
> DT-representation of the actual current device tree to a kexec'ed kernel.
I'm not following you argument. Hardware hotplug systems like PCIe don't
manipulate the firmware data. The kernel detects the new device and
populates the Linux device model directly. Firmware provided data (ACPI
or FDT) isn't involved.
>
> I missed the initial design discussions, so forgive me if this has been
> beaten to death before.
It's a good question. An alternative would be to keep the overlay tree
as a separate data structure and figure out how to make the core code
reference the overlay when iterating over nodes and properties. I don't
know how complex it would be to do that. We would definitely need to
adjust the data structure a bit, but that isn't an insurmountable
barrier.
g.
next prev parent reply other threads:[~2014-05-20 5:50 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 12:43 [PATCH v4 0/8] Introducing (yet again) Device Tree Overlays Pantelis Antoniou
2014-04-04 12:43 ` [PATCH v4 1/8] OF: Introduce Device Tree resolve support Pantelis Antoniou
2014-04-04 12:43 ` [PATCH v4 2/8] OF: Introduce DT overlay support Pantelis Antoniou
2014-05-14 10:08 ` Grant Likely
2014-05-14 12:11 ` Michael Stickel
2014-05-14 15:49 ` Grant Likely
2014-05-14 16:13 ` Guenter Roeck
2014-05-15 7:14 ` Pantelis Antoniou
2014-05-14 13:03 ` Geert Uytterhoeven
2014-05-14 13:18 ` Guenter Roeck
2014-05-15 7:15 ` Pantelis Antoniou
2014-05-14 15:34 ` Grant Likely
2014-05-15 7:12 ` Pantelis Antoniou
2014-05-15 7:20 ` Geert Uytterhoeven
2014-05-16 10:58 ` Grant Likely
2014-05-16 11:52 ` Geert Uytterhoeven
2014-05-20 5:50 ` Grant Likely [this message]
2014-05-20 7:38 ` Geert Uytterhoeven
2014-05-26 10:48 ` Grant Likely
2014-05-26 10:57 ` Geert Uytterhoeven
2014-05-26 11:08 ` Pantelis Antoniou
2014-05-26 11:23 ` Grant Likely
2014-05-26 11:55 ` Pantelis Antoniou
2014-05-26 15:09 ` Sebastian Reichel
2014-05-26 15:14 ` Guenter Roeck
2014-05-26 23:00 ` Sebastian Reichel
2014-05-26 15:14 ` Pantelis Antoniou
2014-05-26 21:33 ` Grant Likely
2014-05-26 21:44 ` Geert Uytterhoeven
2014-05-26 23:47 ` Guenter Roeck
2014-05-27 12:11 ` Grant Likely
2014-05-26 22:36 ` Sebastian Reichel
2014-05-26 23:42 ` Guenter Roeck
2014-05-27 0:32 ` Sebastian Reichel
2014-05-27 0:54 ` Guenter Roeck
2014-05-27 12:12 ` Grant Likely
2014-05-27 12:24 ` Pantelis Antoniou
2014-05-27 15:21 ` Guenter Roeck
2014-05-27 15:38 ` Pantelis Antoniou
2014-05-27 17:52 ` Geert Uytterhoeven
2014-05-27 18:22 ` Guenter Roeck
2014-05-27 20:11 ` Grant Likely
2014-05-20 12:27 ` Pantelis Antoniou
2014-05-15 14:18 ` Grant Likely
2014-04-04 12:43 ` [PATCH v4 3/8] OF: DT-Overlay configfs interface Pantelis Antoniou
2014-04-04 12:43 ` [PATCH v4 4/8] OF: platform: Add overlay bus handler Pantelis Antoniou
2014-04-04 12:43 ` [PATCH v4 5/8] of: i2c: Export single device registration method Pantelis Antoniou
2014-04-04 12:43 ` [PATCH v4 6/8] OF: i2c: Add overlay bus handler Pantelis Antoniou
2014-04-04 12:44 ` [PATCH v4 7/8] OF: spi: " Pantelis Antoniou
2014-04-04 12:44 ` [PATCH v4 8/8] OF: selftest: Add overlay self-test support Pantelis Antoniou
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=20140520055026.E3A98C412DA@trevor.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=Alison_Chaiken@mentor.com \
--cc=alexander.sverdlin@nsn.com \
--cc=dan.malek@konsulko.com \
--cc=delicious.quinoa@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dinh.linux@gmail.com \
--cc=dirk.behme@gmail.com \
--cc=geert@linux-m68k.org \
--cc=georgi.vlaev@konsulko.com \
--cc=ioan.nicu.ext@nsn.com \
--cc=jluebbe@lasnet.de \
--cc=koen@dominion.thruhere.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matt.porter@linaro.org \
--cc=mbohan@codeaurora.org \
--cc=monstr@monstr.eu \
--cc=mranostay@gmail.com \
--cc=ms@mycable.de \
--cc=pantelis.antoniou@konsulko.com \
--cc=pete.popov@konsulko.com \
--cc=robherring2@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=swarren@wwwdotorg.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
all inboxes | Powered by JetHome®