devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Phil Elwell <philip.j.elwell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Nishanth Menon <nm-l0cyMroinI0@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Devicetree Compiler
	<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	David Gibson
	<david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>,
	Tom Rini <trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org>,
	Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH 1/2] fdt: Allow stacked overlays phandle references
Date: Thu, 13 Jul 2017 13:07:19 -0700	[thread overview]
Message-ID: <5967D2F7.60303@gmail.com> (raw)
In-Reply-To: <CAPhXvM4NzU61dENLeJ2Xt=arKqYFjXaPBvzrjxAJ7h3Y-gT4Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 07/13/17 12:38, Phil Elwell wrote:

(I moved Phil's reply to after the email he replied to.)

> On 13 Jul 2017 8:32 pm, "Frank Rowand" <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
>> On 07/03/17 02:06, David Gibson wrote:
>>> On Wed, Jun 14, 2017 at 05:52:25PM +0300, Pantelis Antoniou wrote:
>>>> This patch enables an overlay to refer to a previous overlay's
>>>> labels by performing a merge of symbol information at application
>>>> time.
>>>
>>> This seems to be doing things the hard way.
>>>
>>> You're essentially extending the semantics of overlay application to
>>> add the symbol merging.  You've implemented these extended semantics
>>> in libfdt, which is all very well, but that's not the only overlay
>>> application implementation.
>>>
>>>
>>> It seems to me a better approach would be to change dtc's -@
>>> implementation, so that in /plugin/ mode instead of making a global
>>> __symbols__ node, it puts it into the individual fragments.  That way
>>> the existing overlay application semantics will update the __symbols__
>>> node.
>>
>> If the __symbols__ node was inside a fragment, then the existing
>> code would add (or update) a __symbols__ node located at the location
>> pointed to by the fragment's target path, instead of updating the
>> node /__symbols__.
>>
>> It makes sense to me to have only one global __symbols__ node instead
>> of several.
>>
>> If there is a global __symbols__ node then we have a single name
>> space for symbols.
>>
>> If there are multiple __symbols__ nodes spread throughout the tree,
>> then to me that would imply different name spaces spread throughout
>> the tree, where namespaces are determined by fragments.  This sounds
>> confusing to me.  Or if the intent is to have a single name space
>> then the __symbols__ information would be scattered throughout the
>> tree instead of located in a single node.
>>
>> My current patch (under review), targeted for Linux 4.13-rc1, puts
>> an overlay's __symbols__ node properties into the overlay's
>> changeset, so they get added when the overlay is loaded and
>> removed when the overlay is unloaded.

> Can we also consider a mechanism for overlay-local symbols, i.e. symbols
> that are used purely to create links within an overlay - perhaps using a
> particular naming convention? This would make it easier to instantiate an
> overlay multiple times without having to uniquify all symbols, and it would
> avoid polluting the global namespace without reason.
> 
> Phil

That is essentially the result you get if you compile the overlay dts
without '-@'.  There will be no __sympls__ node created even if there
are symbols within the overlay.

This is important if the overlay is for an add-on board which might
have several instances plugged into different sockets on the base
system.

But Phil does bring up an interesting use case.  If the add-on board
("level one add-on") in turn has a socket that an additional board
("level two add-on") can be plugged into, then the level two add-on
overlay might have a need to reference a symbol from the overlay
for the level one add-on.  And since there may be multiple level one
add-on cards in the system, the overlay for each of the level one
add-ons would need to export its symbols in a name space only
visible to the level two add-on plugged into that specific level
on add-on.

-Frank
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-07-13 20:07 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 14:52 [PATCH 0/2] stacked overlay support Pantelis Antoniou
     [not found] ` <1497451946-15443-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2017-06-14 14:52   ` [PATCH 1/2] fdt: Allow stacked overlays phandle references Pantelis Antoniou
     [not found]     ` <1497451946-15443-2-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2017-07-03  9:06       ` David Gibson
     [not found]         ` <20170703090648.GV13989-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-03 12:41           ` Pantelis Antoniou
2017-07-07  7:09             ` David Gibson
     [not found]               ` <20170707070915.GD24325-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-07 14:01                 ` Tom Rini
2017-07-13 19:51                   ` Frank Rowand
2017-07-13 19:40                 ` Frank Rowand
     [not found]                   ` <5967CCA8.6030406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-26  4:18                     ` David Gibson
2017-07-13 19:35             ` Frank Rowand
2017-07-13 19:31           ` Frank Rowand
2017-07-13 19:38             ` Phil Elwell
     [not found]               ` <CAPhXvM4NzU61dENLeJ2Xt=arKqYFjXaPBvzrjxAJ7h3Y-gT4Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-13 20:07                 ` Frank Rowand [this message]
     [not found]                   ` <5967D2F7.60303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-13 20:08                     ` Frank Rowand
2017-07-13 21:22                     ` Phil Elwell
     [not found]                       ` <f06fe24c-7f32-4e7d-c28b-2e5b31c5dbf0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-13 21:40                         ` Frank Rowand
     [not found]                           ` <5967E8BC.4090307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-14  7:21                             ` Pantelis Antoniou
2017-07-24 18:06                               ` Frank Rowand
     [not found]                                 ` <59763739.4070708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-24 20:51                                   ` Phil Elwell
     [not found]                                     ` <7b6a51ad-70a4-efaf-0a11-c576a95fd222-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-24 22:44                                       ` Frank Rowand
2017-07-26  4:55                                   ` David Gibson
     [not found]                                     ` <20170726045533.GD8978-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-26 14:03                                       ` Frank Rowand
     [not found]                                         ` <5978A11F.1010008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-27  7:24                                           ` David Gibson
2017-07-26  4:32                               ` David Gibson
     [not found]                                 ` <20170726043227.GC8978-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-26 13:59                                   ` Frank Rowand
     [not found]                                     ` <5978A047.6060406-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-27  7:23                                       ` David Gibson
     [not found]                                         ` <20170727072351.GA7970-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-27 17:24                                           ` Frank Rowand
     [not found]                                             ` <597A21C1.6030104-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-31  4:06                                               ` David Gibson
2017-07-26  4:28                             ` David Gibson
2017-07-26  4:23                 ` David Gibson
     [not found]                   ` <20170726042315.GA8978-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-26 15:01                     ` Tom Rini
2017-07-27  7:25                       ` David Gibson
     [not found]                         ` <20170727072534.GC7970-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-27 11:24                           ` Tom Rini
     [not found]             ` <5967CAA6.6010801-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-07-26  4:21               ` David Gibson
2017-06-14 14:52   ` [PATCH 2/2] tests: Add stacked overlay tests on fdtoverlay 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=5967D2F7.60303@gmail.com \
    --to=frowand.list-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nm-l0cyMroinI0@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=philip.j.elwell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=t-kristo-l0cyMroinI0@public.gmane.org \
    --cc=trini-OWPKS81ov/FWk0Htik3J/w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).