All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Tom Rini <trini@konsulko.com>, devicetree@vger.kernel.org
Cc: Tero Kristo <t-kristo@ti.com>, Nishanth Menon <nm@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Sekhar Nori <nsekhar@ti.com>, Rob Herring <robh+dt@kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <mmarek@suse.com>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] devicetree: Enable generation of __symbols__ in all dtb files
Date: Tue, 15 Aug 2017 17:18:03 -0700	[thread overview]
Message-ID: <59938F3B.30704@gmail.com> (raw)
In-Reply-To: <1502831736-28282-1-git-send-email-trini@konsulko.com>

On 08/15/17 14:15, Tom Rini wrote:
> With support for stacked overlays being part of libfdt it is now
> possible and likely that overlays which require __symbols__ will be
> applied to the dtb files generated by the kernel.  This is done by
> passing -@ to dtc.  This does increase the filesize (and resident memory
> usage) based on the number of __symbol__ entries added to match the
> contents of the dts.

< snip >

And for some background, for those who were not on the irc channel,
here is the conversation that Tom and I had:

<Tartarus> frowand: So, dtc knows -@, but the kernel doesn't globally use -@ yet due to increased memory usage, in the dtb?
<frowand> yes
<frowand> It is available via the pattern that you can see in drivers/of/unittest-data/Makefile
<Tartarus> Is there an opt-in way to get the extra symbols?
<frowand> # enable creation of __symbols__ node
<frowand> DTC_FLAGS_overlay := -@
<Tartarus> ah, hm
<frowand> The problem is that it is always on, once the flags are added
<frowand> there are a few ways I have thought of making it optional
<frowand> 1) DTC_FLAGS_overlay := CONFIG_OVERLAY_ENABLED_IN_BASE
<Tartarus> OK.  There's at least a few vendors that are eagerly awaiting overlays Just Working, is why I'm asking
<Tartarus> How much extra memory usage are we talking about, on a 'big' platform for example?
<frowand> where  CONFIG_OVERLAY_ENABLED_IN_BASE is a string of either empty or "-@".  I don't know if the kconfig allows that, but I'm guessing there is some way to do it
<frowand> Not sure of size penalty.
<Tartarus> CONFIG_USE_xxx as a bool, CONFIG_xxx as the string
<Tartarus> I would kind of assume wanting overlays to just work would be the common case, at least in terms of in-kernel users
<frowand> 2) When instantiating the device tree from the FDT, do not keep the __SYMBOLS__ node if overlays are not enabled in the kernel
<Tartarus> ie if it's a CONFIG opt-in, multi_v7_defconfig, etc, would want it on
<frowand> the issue with 2, is that the boot image still has the size penalty
<frowand> 3) the bootloader could choose whether to pass the __SYMBOLS__ node to the kernel or not
<Tartarus> I'm not sure about 3 honestly
<frowand> Yep, 3 is my least favorite.
<Tartarus> If one has a case where there's a desire for no overlay support, for whatever reason, that's a feature of the kernel
<frowand> There is probably also option 4, 5, etc.  But I haven't thought it through too deeply yet.
<Tartarus> I can see some sort of CONFIG option, default y, being a reasonable option here
<frowand> I'm not sure about the common case.  There are some boards where overlays would almost always be used, but there may also be boards where there are rarely used.
<frowand> But the common case is a bikeshed issue to me.
<Tartarus> heh
<Tartarus> Well, here's why I was thinking that
<frowand> As long as the users and distros have a way to control it.
<Tartarus> Lots of proprietary boards I've dealt with could just be an EVM + overlay
<Tartarus> wrt dtb
<frowand> what is EVM?
<Tartarus> Today it's take the evm dts, start hacking
<Tartarus> evaluation platform
<Tartarus> The second, similar, example would be custom platforms based on SoMs
<frowand> Are you saying to use an overlay to add onto the base EVM dts kinda sorta the way that some driver writers use kernel modules to add drivers?
<Tartarus> A reasonable analogy, yes
<frowand> ok, just wanted to verify I understood the model
<frowand> I see that as a reasonable development technique
<frowand> I have some time critical errands to run, so I'll be gone for a few hours.  It would be good to share what we just said with the mail list, and see if anyone else has some brilliant ideas.  Start with what the objectives/issues are, some possible solutions...


  parent reply	other threads:[~2017-08-16  0:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 21:15 [PATCH] devicetree: Enable generation of __symbols__ in all dtb files Tom Rini
2017-08-15 21:15 ` Tom Rini
2017-08-15 22:36 ` Rob Herring
2017-08-15 22:49   ` Tom Rini
2017-08-16 15:43     ` Rob Herring
2017-08-16 15:57       ` Tom Rini
2017-08-16 15:57         ` Tom Rini
2017-08-16 16:16         ` Rob Herring
2017-08-16 18:10           ` Frank Rowand
2017-08-16 18:10             ` Frank Rowand
2017-08-15 23:57   ` Frank Rowand
2017-08-15 23:59     ` Frank Rowand
2017-08-15 23:59       ` Frank Rowand
2017-08-16  9:42     ` Pantelis Antoniou
2017-08-16  9:42       ` Pantelis Antoniou
2017-08-16 17:55       ` Frank Rowand
2017-08-16  0:14   ` Frank Rowand
2017-08-16  0:14     ` Frank Rowand
2017-08-15 23:50 ` Frank Rowand
2017-08-16  0:42   ` Tom Rini
2017-08-16  0:42     ` Tom Rini
2017-08-16  3:22     ` Frank Rowand
2017-08-16 15:09       ` Tom Rini
2017-08-16 18:15         ` Frank Rowand
2017-08-16 15:22     ` Rob Herring
2017-08-16 15:41       ` Tom Rini
2017-08-16 16:00         ` Rob Herring
2017-08-16 16:00           ` Rob Herring
2017-08-16  0:18 ` Frank Rowand [this message]
2017-08-16  9:37 ` 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=59938F3B.30704@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=nm@ti.com \
    --cc=nsekhar@ti.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=trini@konsulko.com \
    --cc=yamada.masahiro@socionext.com \
    /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.