From: Sebastian Reichel <sre@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
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>,
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, 27 May 2014 02:32:20 +0200 [thread overview]
Message-ID: <20140527003219.GD32691@earth.universe> (raw)
In-Reply-To: <5383D174.8070304@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 2742 bytes --]
On Mon, May 26, 2014 at 04:42:44PM -0700, Guenter Roeck wrote:
> On 05/26/2014 03:36 PM, Sebastian Reichel wrote:
> >On Mon, May 26, 2014 at 10:33:03PM +0100, Grant Likely wrote:
> >>After thinking about it more, I think it is very likely that removing
> >>all the overlays is the correct thing to do in the kexec use-case. When
> >>kexec-ing, it makes sense that we'd want the exact same behaviour from
> >>the kexec'ed kernel. That means we want the device drivers to do the
> >>same thing including loading whatever overlays they depend on.
> >>
> >>If the flattened tree was left applied, then the behaviour becomes
> >>different.
> >>
> >>I say always remove the overlays unless explicitly told not to, but I'm
> >>struggling to come up with use cases where keeping them applied is
> >>desirable.
> >
> >I would assume, that I want them applied in most cases. DT describes
> >the hardware. If I kexec into a new kernel I change software, not
> >hardware.
> >
> >Maybe I'm missing the main purpose of the feature. I currently see
> >two useful usecases for DT overlays:
> >
> >1. The dtb the kernel is booted with cannot be changed for some
> > reason, but the board has additional hardware attached (e.g.
> > the user added a sensor on the i2c bus)
> >2. The hardware is changed on the fly (e.g. the user flashed the
> > FPGA part of a zynq processor), sensors on i2c bus, ...
> >
> >In both cases the kernel should be booted with the additional
> >overlay information IMHO. Though for the second case it should
> >be possible to remove the "programmed" hardware information
> >somehow.
> >
>
> 3. Some hot-plug device or card is inserted or removed.
Can you give a more specific example? I guess most hot-plug
devices are connected to busses, which are not described via
DT, but support auto-identification (USB, PCI, ...)
> I would argue that the kernel should _not_ be booted with the
> overlay in place.
well the device is still attached to the system when you kexec
into the new kernel, isn't it?
> Otherwise the code handling overlays would have to have special
> handling for the restart case, which is much more complex than
> just to re-insert the overlay when it is determined that the
> device or card is still there.
I assume, that the kernel cannot auto-detect the attached hardware.
Otherwise we don't need the DT entries, but can simply scan the bus.
So the restart case (or restart + kexec case if kexec behaves like a
restart) means, that userspace needs to provide the information
about device existence.
Removing the overlay is like dropping information supplied from the
user. Not something, which should be done carelessly.
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-05-27 0:32 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
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 [this message]
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=20140527003219.GD32691@earth.universe \
--to=sre@kernel.org \
--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=grant.likely@secretlab.ca \
--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®