All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	cyril@debamax.com, Arnd Bergmann <arnd@arndb.de>,
	Maxime Ripard <mripard@kernel.org>,
	DTML <devicetree@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH] cmd_dtc: Enable generation of device tree symbols
Date: Tue, 26 Jan 2021 08:20:59 +0100	[thread overview]
Message-ID: <9d9bb0f6-d4f4-b1b9-a4c4-786987578085@kleine-koenig.org> (raw)
In-Reply-To: <CAK7LNAS5t1wew0MMFjdB5HGCAMerhU7pAGiFhcTtCRUAAjGLpw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2180 bytes --]

Hello Masahiro,

On 1/25/21 10:53 PM, Masahiro Yamada wrote:
> On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote:
>>
>> Adding the -@ switch to dtc results in the binary devicetrees containing
>> a list of symbolic references and their paths. This is necessary to
>> apply device tree overlays e.g. on Raspberry Pi as described on
>> https://www.raspberrypi.org/documentation/configuration/device-tree.md.
>>
>> Obviously the downside of this change is an increas of the size of the
>> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig):
>>
>>          $ du -s arch/arm/boot/dts*
>>          101380  arch/arm/boot/dts-pre
>>          114308  arch/arm/boot/dts-post
>>
>> so this is in average an increase of 12.8% in size.
>>
>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> 
> 
> (CCing DT ML.)

makes sense, thanks.

> https://www.spinics.net/lists/linux-kbuild/msg27904.html
> 
> See Rob's comment:
> 
> "We've already rejected doing that. Turning on '-@' can grow the dtb
> size by a significant amount which could be problematic for some
> boards."

The patch was created after some conversation on irc which continued
after I sent the patch. I added the participating parties to Cc:.

The (relevant) followups were:

Geert suggested to always generate the symbols and provide a way to
strip the symbols for installation if and when they are not needed.

Rob said: "I'm less concerned with the size increases, but rather that
labels go from purely source syntax to an ABI. I'd rather see some
decision as to which labels are enabled or not."

And then I learned with hints from Rob and Geert that symbols are not
really necessary for overlays, you just cannot use named labels. But
using

	target-path = "/soc/i2c@23473245";

or

	target = <&{/soc/i2c@23473245}>;

instead of

	target = <&i2c1>;

works fine. (And if you need to add a phandle the &{/path/to/node}
construct should work, too (but I didn't test).) Using labels is a tad 
nicer, but the problem I wanted to address with my patch now has a known 
different solution.

Best regards
Uwe


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: DTML <devicetree@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Maxime Ripard <mripard@kernel.org>,
	cyril@debamax.com, Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] cmd_dtc: Enable generation of device tree symbols
Date: Tue, 26 Jan 2021 08:20:59 +0100	[thread overview]
Message-ID: <9d9bb0f6-d4f4-b1b9-a4c4-786987578085@kleine-koenig.org> (raw)
In-Reply-To: <CAK7LNAS5t1wew0MMFjdB5HGCAMerhU7pAGiFhcTtCRUAAjGLpw@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2180 bytes --]

Hello Masahiro,

On 1/25/21 10:53 PM, Masahiro Yamada wrote:
> On Mon, Jan 25, 2021 at 8:07 PM Uwe Kleine-König <uwe@kleine-koenig.org> wrote:
>>
>> Adding the -@ switch to dtc results in the binary devicetrees containing
>> a list of symbolic references and their paths. This is necessary to
>> apply device tree overlays e.g. on Raspberry Pi as described on
>> https://www.raspberrypi.org/documentation/configuration/device-tree.md.
>>
>> Obviously the downside of this change is an increas of the size of the
>> generated dtbs, for an arm out-of-tree build (multi_v7_defconfig):
>>
>>          $ du -s arch/arm/boot/dts*
>>          101380  arch/arm/boot/dts-pre
>>          114308  arch/arm/boot/dts-post
>>
>> so this is in average an increase of 12.8% in size.
>>
>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> 
> 
> (CCing DT ML.)

makes sense, thanks.

> https://www.spinics.net/lists/linux-kbuild/msg27904.html
> 
> See Rob's comment:
> 
> "We've already rejected doing that. Turning on '-@' can grow the dtb
> size by a significant amount which could be problematic for some
> boards."

The patch was created after some conversation on irc which continued
after I sent the patch. I added the participating parties to Cc:.

The (relevant) followups were:

Geert suggested to always generate the symbols and provide a way to
strip the symbols for installation if and when they are not needed.

Rob said: "I'm less concerned with the size increases, but rather that
labels go from purely source syntax to an ABI. I'd rather see some
decision as to which labels are enabled or not."

And then I learned with hints from Rob and Geert that symbols are not
really necessary for overlays, you just cannot use named labels. But
using

	target-path = "/soc/i2c@23473245";

or

	target = <&{/soc/i2c@23473245}>;

instead of

	target = <&i2c1>;

works fine. (And if you need to add a phandle the &{/path/to/node}
construct should work, too (but I didn't test).) Using labels is a tad 
nicer, but the problem I wanted to address with my patch now has a known 
different solution.

Best regards
Uwe


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-01-26 17:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 10:57 [PATCH] cmd_dtc: Enable generation of device tree symbols Uwe Kleine-König
2021-01-25 10:57 ` Uwe Kleine-König
2021-01-25 11:15 ` Cyril Brulebois
2021-01-25 11:15   ` Cyril Brulebois
2021-01-26 18:01   ` Frank Rowand
2021-01-26 18:01     ` Frank Rowand
2021-01-25 21:53 ` Masahiro Yamada
2021-01-25 21:53   ` Masahiro Yamada
2021-01-26  7:20   ` Uwe Kleine-König [this message]
2021-01-26  7:20     ` Uwe Kleine-König
2021-01-26  8:43     ` Geert Uytterhoeven
2021-01-26  8:43       ` Geert Uytterhoeven
2021-01-26 18:03       ` Frank Rowand
2021-01-26 18:03         ` Frank Rowand
2021-01-26 13:42     ` Rob Herring
2021-01-26 13:42       ` Rob Herring
2021-01-26 18:03     ` Frank Rowand
2021-01-26 18:03       ` Frank Rowand
2021-01-26 18:26       ` Frank Rowand
2021-01-26 18:26         ` Frank Rowand
2021-01-26 18:02   ` Frank Rowand
2021-01-26 18:02     ` Frank Rowand
2021-01-26 18:01 ` Frank Rowand
2021-01-26 18:01   ` 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=9d9bb0f6-d4f4-b1b9-a4c4-786987578085@kleine-koenig.org \
    --to=uwe@kleine-koenig.org \
    --cc=arnd@arndb.de \
    --cc=cyril@debamax.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.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.