mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
To: Frank Rowand <frowand.list@gmail.com>
Cc: Moritz Fischer <mdf@kernel.org>, Rob Herring <robh@kernel.org>,
	Alan Tull <atull@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	David Laight <David.Laight@aculab.com>,
	linux-fpga@vger.kernel.org
Subject: Re: [PATCH v2 5/5] of/fdt: only store the device node basename in full_name
Date: Fri, 20 Oct 2017 11:06:23 +0300	[thread overview]
Message-ID: <331B5EB4-9C97-4B2C-9B54-BF648F309A50@konsulko.com> (raw)
In-Reply-To: <59E91D4D.8000200@gmail.com>

Hi Frank,

> On Oct 20, 2017, at 00:46 , Frank Rowand <frowand.list@gmail.com> wrote:
> 
> On 10/19/17 13:06, Moritz Fischer wrote:
> 
> < snip >
> 
>> We also have plenty of code that is just not aware of overlays, and
>> assumes certain parts of the tree to stay static.
> 
> I would state that somewhat differently.  :-)  There is very little
> code that is aware of overlays, and most code assumes the device tree
> does not change after early boot.
> 
> This is one of the areas where the creation of overlays needs to be
> done with care.
> 

Correct. But this is not breaking the kernel.

In general we have the following case where we load overlays (at least
well formed overlays that are not doing stupid things).

1. Activation of a new device. Usually this works since is something that’s
normally done at boot.

2. Deactivation of a device. This might break because the removal paths
of platform device especially are not well tested (or never executed for that
matter).

3. Modification of properties in an already activated device. If the device driver
has not installed a device tree modification hook (as in almost 99% of the devices)
it will do absolutely nothing, since the device tree is parsed only at probe time.
I can argue that for these cases we could have a catch-all hook that displays a
message that nothing happened.

4. Modification of some part of the tree that’s not part of a device driver, perhaps
the aliases or chosen node. This may potentially be harmful or harmless depending on
what has been modified. For instance modifying an already existing alias might cause
internal inconsistency about device naming, while adding a new aliases should be harmless.
This is a matter of policy per board, whether to allow or not.

Are there other cases that are potentially more harmful?

> 
>> I ran into that issue when I tried to add thermal zones via an overlay,
>> I've been investigating how to fix the thermal framework to work with
>> overlays since then and have some partially working code.
>> Currently the thermal framework parses the thermal-zones node at boot,
>> and assumes this stays static. This breaks with overlays.
>> 
>> I agree we eventually need to fix the parts that break when we use
>> overlays.
> 

Regards

— Pantelis

  reply	other threads:[~2017-10-20  8:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 15:16 [PATCH v2 0/5] Removing full paths from DT full_name Rob Herring
2017-08-21 15:16 ` [PATCH v2 1/5] powerpc: Convert to using %pOF instead of full_name Rob Herring
2017-08-24 12:37   ` [v2,1/5] " Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 2/5] powerpc: pseries: vio: match parent nodes with of_find_node_by_path Rob Herring
2017-08-22  5:12   ` Michael Ellerman
2017-08-24 18:08     ` Rob Herring
2017-08-25  0:10       ` Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 3/5] powerpc: pseries: remove dlpar_attach_node dependency on full path Rob Herring
2017-08-24 12:37   ` [v2, " Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 4/5] powerpc: pseries: only store the device node basename in full_name Rob Herring
     [not found]   ` <87tvzgd1l3.fsf@concordia.ellerman.id.au>
2017-10-03 18:44     ` Rob Herring
2017-10-04 12:37       ` Michael Ellerman
2017-08-21 15:16 ` [PATCH v2 5/5] of/fdt: " Rob Herring
2017-10-17 21:32   ` Alan Tull
2017-10-17 21:46     ` Rob Herring
2017-10-17 23:51       ` Frank Rowand
2017-10-18 15:12         ` Alan Tull
2017-10-18 15:44           ` Rob Herring
2017-10-18 15:53             ` Pantelis Antoniou
2017-10-18 18:30               ` Rob Herring
2017-10-18 21:46                 ` Frank Rowand
2017-10-19  8:41                   ` Pantelis Antoniou
2017-10-19  8:51                 ` Pantelis Antoniou
2017-10-19 20:06                   ` Moritz Fischer
2017-10-19 21:46                     ` Frank Rowand
2017-10-20  8:06                       ` Pantelis Antoniou [this message]
2017-10-18 18:39               ` Alan Tull
2017-10-18 21:40                 ` Frank Rowand
2017-11-28 13:13   ` Geert Uytterhoeven
2017-11-28 13:26     ` Rob Herring

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=331B5EB4-9C97-4B2C-9B54-BF648F309A50@konsulko.com \
    --to=pantelis.antoniou@konsulko.com \
    --cc=David.Laight@aculab.com \
    --cc=atull@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mdf@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=robh@kernel.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®