From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Ian Lepore <ian-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>
Cc: Kyle Evans <kevans-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>,
Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Jon Loeliger <jdl-CYoMK+44s/E@public.gmane.org>,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 1/2] overlays: auto allocate phandles for nodes in base fdt
Date: Fri, 5 Jan 2018 14:53:17 +1100 [thread overview]
Message-ID: <20180105035317.GJ24581@umbus.fritz.box> (raw)
In-Reply-To: <1515103688.1759.29.camel-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2867 bytes --]
On Thu, Jan 04, 2018 at 03:08:08PM -0700, Ian Lepore wrote:
> On Thu, 2018-01-04 at 15:47 -0600, Kyle Evans wrote:
> > On Thu, Jan 4, 2018 at 3:34 PM, Kyle Evans <kevans-h+KGxgPPiopAfugRpC6u6w@public.gmane.org> wrote:
> > >
> > > On Thu, Jan 4, 2018 at 2:41 PM, Kyle Evans <kevans-h+KGxgPPiopAfugRpC6u6w@public.gmane.org> wrote:
> > > >
> > > > On Thu, Jan 4, 2018 at 2:33 PM, Frank Rowand wrote:
> > > > >
> > > > > [... snip ...]
> > > > >
> > > > > Does this remove the need for the proposed patch, or am I still
> > > > > missing something?
> > > > ... nope. Apparently I never tested this with this particular dtc(1)
> > > > and instead just assumed it did the same as ours- allocate phandle
> > > > sparsely, even with -@. That certainly removes the need for this
> > > > patch, and I'm somewhat upset that I hadn't previously considered
> > > > this.
> > > >
> > > > @David, Jon: Please disregard all of the patches along these lines...
> > > > I'll fix this in our dtc, where it should be fixed.
> > > >
> > > > Thanks, Frank!
> > > Actually, I'm kind of torn on whether this is useful or not. With
> > > being able to have EFI-provided FDT, it's hard to guarantee whether
> > > the FDT we're provided has been compiled with GPL dtc(1) and -@. The
> > > above solves this problem for most of my personal use-cases , though,
> > > since I can guarantee that our FDT and U-Boot provided FDT is compiled
> > > properly.
> > Apologies for the triple post; I realized that this argument is
> > inherently wrong, since we can't reference the node if there's no
> > symbol anyways.
> >
> > The only way this might still be a good idea is to support more
> > minimal cases where an implementation might prefer to not create a
> > phandle for nodes that haven't been referenced.
> >
> > In our case, we have a function [1] that walks the tree and generates
> > metadata on nodes that have phandles, under the assumption that these
> > have been referenced somewhere and provides a way to more quickly
> > reference these specifically through a separate linked link.
> > Allocating phandles for everything as GPL dtc does adds quite a bit
> > more overhead to this.
> >
> > [1] http://src.illumos.org/source/xref/freebsd-head/sys/dev/ofw/openfirm.c#119
>
> In particular, it makes lookups more expensive as it now must traverse
> a list that includes every node in the dtb, rather than just nodes that
> are actually referenced. (It also increases the amount of storage, but
> at 20-ish bytes per node, that's not a big deal.)
Lookups of what exactly? Aren't you unflattening the tree after you
read it in?
--
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: 833 bytes --]
next prev parent reply other threads:[~2018-01-05 3:53 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 20:15 [PATCH v2 1/2] overlays: auto allocate phandles for nodes in base fdt Kyle Evans
[not found] ` <CACNAnaEGfaZ=s5x8pw2AHf+SQHLTCTGCedL+TxOKXbA=e=kj0w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04 20:33 ` Frank Rowand
[not found] ` <9711cac8-2501-7d68-2fb3-1c3a952fa96a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-04 20:41 ` Kyle Evans
[not found] ` <CACNAnaHck=vyC8dYa0HeFzd=MryucvOUSyYvkJw68tBe_goxWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04 21:34 ` Kyle Evans
[not found] ` <CACNAnaG=kcaUFFH7Dh70o1x-=1WxgJJGE1s0zsTdLvdYCcviMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04 21:47 ` Kyle Evans
[not found] ` <CACNAnaHa=OuCrzVegg=7AemS8x=ADFsDs88WQ0phM+TLuYcZJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04 22:08 ` Ian Lepore
[not found] ` <1515103688.1759.29.camel-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>
2018-01-05 3:53 ` David Gibson [this message]
[not found] ` <20180105035317.GJ24581-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-05 4:23 ` Kyle Evans
[not found] ` <CACNAnaEXyhHcxCPz7MYmKS=uh-QdxUDZx7dSuY2=fpzLO44SWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 20:43 ` Frank Rowand
2018-01-05 1:55 ` Frank Rowand
[not found] ` <fe1b36f1-9e38-0d32-6879-b9cd495afd12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-05 2:39 ` Kyle Evans
[not found] ` <CACNAnaFX6D8xqPFpgGGP6n7OzA29gB1pjFUpmmNM9roJgpPrdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 3:14 ` Frank Rowand
[not found] ` <41a2006b-9b54-d803-7a28-457091db6f42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-05 3:50 ` Kyle Evans
[not found] ` <CACNAnaGoZ+Ne6-d75q7bRokQ-Kr4iDr5kJAEXUybYvw2g2cbPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 5:02 ` Frank Rowand
[not found] ` <5c11d86d-da33-ece5-3170-8fa0bbe5b546-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-05 5:47 ` Kyle Evans
[not found] ` <CACNAnaER1_EW0_HSWcViSiGPTqoLKkh-JF0UKLN1hAwzxhizvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 20:40 ` Frank Rowand
[not found] ` <79ae4708-6a55-a6b6-7eaf-e473baa2c1ac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-05 21:04 ` Kyle Evans
[not found] ` <CACNAnaFHQSPz4c_hLtGdn+9K6fz9iAZ+wL0Z+Tmz_7+=CJfkOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 21:22 ` Frank Rowand
[not found] ` <2a75a5f8-dba9-7ff2-4443-f1c2ffb374cc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-06 0:47 ` Kyle Evans
[not found] ` <CACNAnaFA7WHR1aDzX9qu=cbV48bDkdTDpR0x=bbARdOSmx7VOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-06 1:59 ` Kyle Evans
[not found] ` <CACNAnaE0AWtiTELCy07EVs2uGELU7Ber5cpg=O1TZjDsGdKPUw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16 14:07 ` David Gibson
2018-01-16 14:05 ` David Gibson
[not found] ` <20180116140512.GO30352-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-16 15:24 ` Kyle Evans
[not found] ` <CACNAnaEWNAXMFReZxQGJn2uyUvx_c0GuLWCo4h53bZOt7Fhvrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16 23:38 ` David Gibson
2018-01-12 5:33 ` David Gibson
[not found] ` <20180112053310.GL24770-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-12 7:07 ` Frank Rowand
2018-01-12 15:57 ` Kyle Evans
[not found] ` <CACNAnaEWn4+hOREZ57-UNKRuypgght1C6_5oVkqhwmaj-1yGLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-12 16:24 ` Kyle Evans
[not found] ` <CACNAnaHL2q7kxNdete2L+ZNs7kDZY-g-Ly4bgYWfQsBy0R5KdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16 13:34 ` David Gibson
[not found] ` <20180116133418.GL30352-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-16 15:37 ` Kyle Evans
2018-01-16 13:30 ` David Gibson
[not found] ` <20180116133040.GK30352-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-16 15:32 ` Kyle Evans
[not found] ` <CACNAnaFfXLVCG0e7KHtvU3rboKJpwMYV-WPqFw+kSMQeMqHu+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-16 23:40 ` David Gibson
2018-01-10 9:44 ` David Gibson
[not found] ` <20180110094431.GC24770-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-10 14:15 ` Kyle Evans
2018-01-10 9:38 ` David Gibson
2018-01-10 9:19 ` David Gibson
2018-01-05 3:40 ` David Gibson
[not found] ` <20180105034057.GH24581-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-05 4:00 ` Kyle Evans
-- strict thread matches above, loose matches on Subject: below --
2018-01-01 6:59 [PATCHv2 0/2] " kevans-HZy0K5TPuP5AfugRpC6u6w
[not found] ` <20180101065945.65451-1-kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org>
2018-01-01 6:59 ` [PATCH v2 1/2] " kevans-HZy0K5TPuP5AfugRpC6u6w
[not found] ` <20180101065945.65451-2-kevans-HZy0K5TPuP5AfugRpC6u6w@public.gmane.org>
2018-01-03 5:42 ` David Gibson
[not found] ` <20180103054220.GP24581-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-03 14:04 ` Kyle Evans
[not found] ` <CACNAnaHW19kCE24KUpi2LFNUS94H2xajq6WWpi0NgY53FAymzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-04 3:26 ` David Gibson
[not found] ` <20180104032600.GA24581-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2018-01-04 14:21 ` Kyle Evans
[not found] ` <CACNAnaHf6bQcJCkStCWy56cUYeXjZcO6TQfT2pCq=oBviDMckg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-05 3:39 ` David Gibson
2018-01-04 20:11 ` Frank Rowand
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=20180105035317.GJ24581@umbus.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ian-h+KGxgPPiopAfugRpC6u6w@public.gmane.org \
--cc=jdl-CYoMK+44s/E@public.gmane.org \
--cc=kevans-h+KGxgPPiopAfugRpC6u6w@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).