devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Tero Kristo <t-kristo@ti.com>, Nishanth Menon <nm@ti.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Sekhar Nori <nsekhar@ti.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <mmarek@suse.com>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] devicetree: Enable generation of __symbols__ in all dtb files
Date: Wed, 16 Aug 2017 11:41:29 -0400	[thread overview]
Message-ID: <20170816154129.GP20467@bill-the-cat> (raw)
In-Reply-To: <CAL_JsqJp+jAf7yNYFd3BX2cjEsvDrb+44qg85+07Q639aFSapg@mail.gmail.com>

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

On Wed, Aug 16, 2017 at 10:22:03AM -0500, Rob Herring wrote:
> On Tue, Aug 15, 2017 at 7:42 PM, Tom Rini <trini@konsulko.com> wrote:
> > On Tue, Aug 15, 2017 at 04:50:40PM -0700, Frank Rowand wrote:
> >> 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.
> >> >
> >> > Cc: Rob Herring <robh+dt@kernel.org>
> >> > Cc: Frank Rowand <frowand.list@gmail.com>
> >> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> > Cc: Michal Marek <mmarek@suse.com>
> >> > Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> >> > Cc: devicetree@vger.kernel.org
> >> > Cc: linux-kernel@vger.kernel.org
> >> > CC: linux-kbuild@vger.kernel.org
> >> > Signed-off-by: Tom Rini <trini@konsulko.com>
> >> > ---
> >> > In order for a dtb file to be useful with all types of overlays, it
> >> > needs to be generated with the -@ flag passed to dtc so that __symbols__
> >> > are generated.  This however is not free, and increases the resulting
> >> > dtb file by up to approximately 50% today.  In the current worst case
> >> > this is moving from 88KiB to 133KiB.  In talking with Frank about this,
> >> > he outlined 3 possible ways (with the 4th option of something else
> >> > entirely).
> >> >
> >> > 1. Make passing -@ to dtc be dependent upon some CONFIG symbol.
> >> > 2. In the kernel, if the kernel does not have overlay support, discard
> >> > the __symbols__ information that we've been passed.
> >> > 3. Have the bootloader pass in, or not, __symbols__ information.
> >>
> >> I also was hoping that other people might have ideas for additional
> >> approaches.
> >
> > Yes, please.
> 
> A couple of other options come to mind:
> 
> "make DTC_FLAGS='-@' dtbs" should already work. So there's already a
> way to build what you want and the kernel is not setting the policy.

Not ideal since that drops out the -Wno... flags we pass in.  I don't
see off-hand why it's not appending to DTC_FLAGS, but that's a fixable
problem.

> Do like we do for the unittests and make it a per board decision:
> 
> DTC_FLAGS_my-som-board.dtb := -@
> 
> Then boards that actually need it like SoMs can turn it on.

A concern about that of mine is that we'll start to see a 'flood' of
patches growing that list at the end of arch/arm/boot/dts/Makefile.

-- 
Tom

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

  reply	other threads:[~2017-08-16 15:41 UTC|newest]

Thread overview: 22+ 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 22:36 ` Rob Herring
2017-08-15 22:49   ` Tom Rini
2017-08-16 15:43     ` Rob Herring
     [not found]       ` <CAL_JsqJv-UJzUvAXzTknAq-qko33pA0iyHjEpbe1AgEacP0Neg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-16 15:57         ` Tom Rini
2017-08-16 16:16           ` Rob Herring
     [not found]             ` <CAL_JsqJriAJWi0dxdtPBVVFv8GxFG1=U1aFvHAa5m-V2hg5hyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-16 18:10               ` Frank Rowand
2017-08-15 23:57   ` Frank Rowand
     [not found]     ` <59938A6B.4050906-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-15 23:59       ` Frank Rowand
2017-08-16  9:42       ` Pantelis Antoniou
2017-08-16 17:55         ` Frank Rowand
     [not found]   ` <CABGGiswpz6k4rnXk-3SLpwD5V8+zah-yaaB+yrrLofKY1eBx2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-16  0:14     ` Frank Rowand
2017-08-15 23:50 ` Frank Rowand
     [not found]   ` <599388D0.9050108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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 [this message]
2017-08-16 16:00           ` Rob Herring
2017-08-16  0:18 ` Frank Rowand
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=20170816154129.GP20467@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --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=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 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).