All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Pantelis Antoniou
	<pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
Cc: Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Jan Luebbe <jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Matt Porter <mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>,
	devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v7 4/5] dtc: Plugin and fixup support
Date: Fri, 27 May 2016 17:33:06 +1000	[thread overview]
Message-ID: <20160527073306.GA17226@voom.fritz.box> (raw)
In-Reply-To: <1464112239-29856-5-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

On Tue, May 24, 2016 at 08:50:38PM +0300, Pantelis Antoniou wrote:
> This patch enable the generation of symbols & local fixup information
> for trees compiled with the -@ (--symbols) option.
> 
> Using this patch labels in the tree and their users emit information
> in __symbols__ and __local_fixups__ nodes.
> 
> The __fixups__ node make possible the dynamic resolution of phandle
> references which are present in the plugin tree but lie in the
> tree that are applying the overlay against.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Signed-off-by: Jan Luebbe <jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

So, I think I've identified the underlying thing which was bothering
me about these patches.

With the new dynamic patching stuff, "overlays" (for want of a better
term) now have a real existence both in the dts source format, and in
the dtb object format.  However, these patches don't give them a
concrete, explicit representation within dtc itself - instead we just
kind of mangle one representation to the other as we're parsing.  I
think this is a mistaken approach.

I'm toying with some patches to give overlays a full representation in
dtc which I think will handle these cases better - and allow for
easier experimentation with different possible ways of encoding the
overlays.

One side point - writing plugins in dts format leads to an irritating
little ambiguity in the grammar.  Well, not an ambiguity technically,
but a place where we need more lookahead than normal, meaning we get
shift/reduce conflicts.  It arises because both memreserves and
overlays can have a label in front of them.  So, if we see a label as
our next token after the version tag, we don't know if a memreserve or
overlay is coming next, so the parser doesn't know which path to go
down (with a single token lookahead).  We could handle it with
%glr-parser, of course, but I have been trying to avoid that.  I think
this will apply both with your patches and with the approach I'm
working on - not sure what to do about it yet.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-05-27  7:33 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 17:50 [PATCH v7 0/5] dtc: Dynamic DT support Pantelis Antoniou
     [not found] ` <1464112239-29856-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-24 17:50   ` [PATCH v7 1/5] util: Add xasprintf portable asprintf variant Pantelis Antoniou
     [not found]     ` <1464112239-29856-2-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-25  5:16       ` David Gibson
2016-05-24 17:50   ` [PATCH v7 2/5] DTBO magic and dtbo format options Pantelis Antoniou
     [not found]     ` <1464112239-29856-3-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-25 18:51       ` Frank Rowand
     [not found]         ` <5745F42E.9080100-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-26  0:10           ` David Gibson
2016-05-26  0:11       ` David Gibson
2016-05-24 17:50   ` [PATCH v7 3/5] dtc: Document the dynamic plugin internals Pantelis Antoniou
     [not found]     ` <1464112239-29856-4-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-25 19:13       ` Frank Rowand
     [not found]         ` <5745F95F.6000600-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-26  4:58           ` David Gibson
     [not found]             ` <20160526045801.GD17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  6:16               ` Pantelis Antoniou
2016-05-26  6:16                 ` Pantelis Antoniou
2016-05-26  6:14           ` Pantelis Antoniou
2016-05-26  6:14             ` Pantelis Antoniou
     [not found]             ` <1151E0EF-B811-4C0B-858A-00810BE9BA42-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26  6:28               ` David Gibson
     [not found]                 ` <20160526062848.GG17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  6:31                   ` Pantelis Antoniou
     [not found]                     ` <8CAE1792-841B-4048-B6B1-1F0F973E2E34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26  6:33                       ` David Gibson
     [not found]                         ` <20160526063334.GH17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  6:36                           ` Pantelis Antoniou
     [not found]                             ` <BE239F34-7B36-4A78-BE21-AA48CB8349E4-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26  7:12                               ` David Gibson
     [not found]                                 ` <20160526071243.GI17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-26  7:16                                   ` Pantelis Antoniou
     [not found]                                     ` <C43C3B01-5DF5-49DF-848D-0BEA48E3DB6E-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26 13:49                                       ` Rob Herring
     [not found]                                         ` <CAL_JsqLTrSP577ViKRjoqyagWw4+dZuQQsTMMXdoU3n9HZSYZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-26 16:55                                           ` Frank Rowand
     [not found]                                             ` <57472A9A.1060903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-26 17:09                                               ` Pantelis Antoniou
     [not found]                                                 ` <EAD64177-3519-4CD2-AFB6-5EB765CC7459-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-26 21:31                                                   ` Frank Rowand
     [not found]                                                     ` <57476B27.9070008-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-27 14:52                                                       ` Pantelis Antoniou
     [not found]                                                         ` <26CE3FC4-2B09-45E9-94E2-9EA7836A684F-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-30  4:22                                                           ` David Gibson
     [not found]                                                             ` <20160530042210.GD17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-06-30  2:59                                                               ` Frank Rowand
2016-06-30  2:59                                                                 ` Frank Rowand
     [not found]                                                                 ` <57748B01.4050601-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-06-30  5:17                                                                   ` David Gibson
2016-05-24 17:50   ` [PATCH v7 4/5] dtc: Plugin and fixup support Pantelis Antoniou
     [not found]     ` <1464112239-29856-5-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-05-27  7:33       ` David Gibson [this message]
     [not found]         ` <20160527073306.GA17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-05-31  5:06           ` David Gibson
     [not found]             ` <20160531050634.GJ17226-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2016-06-02 17:13               ` Pantelis Antoniou
     [not found]                 ` <60DA9B11-16A5-49C6-AB27-888D4FCBE3A3-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2016-06-03  1:11                   ` David Gibson
2016-05-24 17:50   ` [PATCH v7 5/5] plugin: Transparently support old style syntax 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=20160527073306.GA17226@voom.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=jdl-CYoMK+44s/E@public.gmane.org \
    --cc=jlu-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mporter-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.