devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms
@ 2017-08-16 21:59 Tom Rini
  2017-08-16 22:33 ` Frank Rowand
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2017-08-16 21:59 UTC (permalink / raw)
  To: devicetree
  Cc: Tero Kristo, Nishanth Menon, Tomi Valkeinen, Sekhar Nori,
	Jason Kridner, Drew Fustini, Robert Nelson, Lokesh Vutla,
	Frank Rowand, Rob Herring, Mark Rutland, Russell King,
	linux-arm-kernel, linux-kernel

Build the dtb file for these platfroms with __symbol__ information
included.  This will reduce the size of the dtb (and resident memory
usage) in exchange for allowing more types of overlays to be applied to
the dtb file prior to passing it to Linux and additional functionality
within the kernel when OF_OVERLAY is enabled.

Cc: Jason Kridner <jkridner@beagleboard.org>
Cc: Drew Fustini <drew@beagleboard.org>
Cc: Robert Nelson <robertcnelson@gmail.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tom Rini <trini@konsulko.com>
---
This patch takes the path that Rob encouraged in my previous patch of
enabling __symbols__ in some platforms now (that can use it) and see if
a critical mass evolves that pushes towards -@ being default for all
dtbs.  I would suggest that the dra76 series be respun to include a hunk
like this at least as well, and if there's another Beagle X15 patch,
that too.  Russell, per some of our conversations, something like would
also be needed as part of using overlays to solve some of the problems
with Hummingboard, etc.
---
 arch/arm/boot/dts/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 4b17f35dc9a7..6f98422ca00e 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
 
 always		:= $(dtb-y)
 clean-files	:= *.dtb
+
+# enable creation of __symbols__ node
+DTC_FLAGS_am335x-bone += -@
+DTC_FLAGS_am335x-boneblack += -@
+DTC_FLAGS_am335x-boneblack-wireless += -@
+DTC_FLAGS_am335x-boneblue += -@
+DTC_FLAGS_am335x-bonegreen += -@
+DTC_FLAGS_am335x-bonegreen-wireless += -@
+DTC_FLAGS_am57xx-beagle-x15 += -@
+DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
+DTC_FLAGS_dra7-evm += -@
+DTC_FLAGS_dra72-evm += -@
+DTC_FLAGS_dra72-evm-revc += -@
+DTC_FLAGS_dra71-evm += -@
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms
  2017-08-16 21:59 [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms Tom Rini
@ 2017-08-16 22:33 ` Frank Rowand
  2017-08-16 22:57   ` Frank Rowand
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Rowand @ 2017-08-16 22:33 UTC (permalink / raw)
  To: Tom Rini, devicetree
  Cc: Tero Kristo, Nishanth Menon, Tomi Valkeinen, Sekhar Nori,
	Jason Kridner, Drew Fustini, Robert Nelson, Lokesh Vutla,
	Rob Herring, Mark Rutland, Russell King, linux-arm-kernel,
	linux-kernel

On 08/16/17 14:59, Tom Rini wrote:
> Build the dtb file for these platfroms with __symbol__ information
> included.  This will reduce the size of the dtb (and resident memory

typo: reduce the size should be increase the size


> usage) in exchange for allowing more types of overlays to be applied to
> the dtb file prior to passing it to Linux and additional functionality
> within the kernel when OF_OVERLAY is enabled.
> 
> Cc: Jason Kridner <jkridner@beagleboard.org>
> Cc: Drew Fustini <drew@beagleboard.org>
> Cc: Robert Nelson <robertcnelson@gmail.com>
> Cc: Lokesh Vutla <lokeshvutla@ti.com>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> This patch takes the path that Rob encouraged in my previous patch of
> enabling __symbols__ in some platforms now (that can use it) and see if
> a critical mass evolves that pushes towards -@ being default for all
> dtbs.  I would suggest that the dra76 series be respun to include a hunk
> like this at least as well, and if there's another Beagle X15 patch,
> that too.  Russell, per some of our conversations, something like would
> also be needed as part of using overlays to solve some of the problems
> with Hummingboard, etc.
> ---
>  arch/arm/boot/dts/Makefile | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 4b17f35dc9a7..6f98422ca00e 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
>  
>  always		:= $(dtb-y)
>  clean-files	:= *.dtb
> +
> +# enable creation of __symbols__ node
> +DTC_FLAGS_am335x-bone += -@
> +DTC_FLAGS_am335x-boneblack += -@
> +DTC_FLAGS_am335x-boneblack-wireless += -@
> +DTC_FLAGS_am335x-boneblue += -@
> +DTC_FLAGS_am335x-bonegreen += -@
> +DTC_FLAGS_am335x-bonegreen-wireless += -@
> +DTC_FLAGS_am57xx-beagle-x15 += -@
> +DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
> +DTC_FLAGS_dra7-evm += -@
> +DTC_FLAGS_dra72-evm += -@
> +DTC_FLAGS_dra72-evm-revc += -@
> +DTC_FLAGS_dra71-evm += -@
> 

I would prefer that instead of "-@", a configurable value be used.

The current form of the patch imposes the extra overhead even
for those who do not want to use any overlay.

Using a kernel CONFIG_ value for the "configurable value" is not
desired because it adds a kernel configuration dependency to what
is contained in a dtb.  I do not know if we can find another
better way to make this configurable.  AMaybe Rob's suggestion
of a shell variable used in the make command.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms
  2017-08-16 22:33 ` Frank Rowand
@ 2017-08-16 22:57   ` Frank Rowand
  2017-08-17  0:33     ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Rowand @ 2017-08-16 22:57 UTC (permalink / raw)
  To: Tom Rini, devicetree
  Cc: Tero Kristo, Nishanth Menon, Tomi Valkeinen, Sekhar Nori,
	Jason Kridner, Drew Fustini, Robert Nelson, Lokesh Vutla,
	Rob Herring, Mark Rutland, Russell King, linux-arm-kernel,
	linux-kernel

On 08/16/17 15:33, Frank Rowand wrote:
> On 08/16/17 14:59, Tom Rini wrote:
>> Build the dtb file for these platfroms with __symbol__ information
>> included.  This will reduce the size of the dtb (and resident memory
> 
> typo: reduce the size should be increase the size
> 
> 
>> usage) in exchange for allowing more types of overlays to be applied to
>> the dtb file prior to passing it to Linux and additional functionality
>> within the kernel when OF_OVERLAY is enabled.
>>
>> Cc: Jason Kridner <jkridner@beagleboard.org>
>> Cc: Drew Fustini <drew@beagleboard.org>
>> Cc: Robert Nelson <robertcnelson@gmail.com>
>> Cc: Lokesh Vutla <lokeshvutla@ti.com>
>> Cc: Frank Rowand <frowand.list@gmail.com>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: Russell King <linux@armlinux.org.uk>
>> Cc: devicetree@vger.kernel.org
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Tom Rini <trini@konsulko.com>
>> ---
>> This patch takes the path that Rob encouraged in my previous patch of
>> enabling __symbols__ in some platforms now (that can use it) and see if
>> a critical mass evolves that pushes towards -@ being default for all
>> dtbs.  I would suggest that the dra76 series be respun to include a hunk
>> like this at least as well, and if there's another Beagle X15 patch,
>> that too.  Russell, per some of our conversations, something like would
>> also be needed as part of using overlays to solve some of the problems
>> with Hummingboard, etc.
>> ---
>>  arch/arm/boot/dts/Makefile | 14 ++++++++++++++
>>  1 file changed, 14 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 4b17f35dc9a7..6f98422ca00e 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
>>  
>>  always		:= $(dtb-y)
>>  clean-files	:= *.dtb
>> +
>> +# enable creation of __symbols__ node
>> +DTC_FLAGS_am335x-bone += -@
>> +DTC_FLAGS_am335x-boneblack += -@
>> +DTC_FLAGS_am335x-boneblack-wireless += -@
>> +DTC_FLAGS_am335x-boneblue += -@
>> +DTC_FLAGS_am335x-bonegreen += -@
>> +DTC_FLAGS_am335x-bonegreen-wireless += -@
>> +DTC_FLAGS_am57xx-beagle-x15 += -@
>> +DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
>> +DTC_FLAGS_dra7-evm += -@
>> +DTC_FLAGS_dra72-evm += -@
>> +DTC_FLAGS_dra72-evm-revc += -@
>> +DTC_FLAGS_dra71-evm += -@
>>
> 
> I would prefer that instead of "-@", a configurable value be used.

I stated that poorly.  It was intended conceptually, not literally.

One possible concrete implementation would be to use something other
than DTC_FLAGS, for example DTC_FLAGS_EXTRA, then have the build
system choose whether to fold DTC_FLAGS_EXTRA into DTC_FLAGS, based
on some sort of configurable value.


> The current form of the patch imposes the extra overhead even
> for those who do not want to use any overlay.
> 
> Using a kernel CONFIG_ value for the "configurable value" is not
> desired because it adds a kernel configuration dependency to what
> is contained in a dtb.  I do not know if we can find another
> better way to make this configurable.  AMaybe Rob's suggestion
> of a shell variable used in the make command.
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms
  2017-08-16 22:57   ` Frank Rowand
@ 2017-08-17  0:33     ` Tom Rini
  2017-08-17  6:15       ` Frank Rowand
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2017-08-17  0:33 UTC (permalink / raw)
  To: Frank Rowand
  Cc: devicetree, Tero Kristo, Nishanth Menon, Tomi Valkeinen,
	Sekhar Nori, Jason Kridner, Drew Fustini, Robert Nelson,
	Lokesh Vutla, Rob Herring, Mark Rutland, Russell King,
	linux-arm-kernel, linux-kernel

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

On Wed, Aug 16, 2017 at 03:57:21PM -0700, Frank Rowand wrote:
> On 08/16/17 15:33, Frank Rowand wrote:
> > On 08/16/17 14:59, Tom Rini wrote:
> >> Build the dtb file for these platfroms with __symbol__ information
> >> included.  This will reduce the size of the dtb (and resident memory
> > 
> > typo: reduce the size should be increase the size
> > 
> > 
> >> usage) in exchange for allowing more types of overlays to be applied to
> >> the dtb file prior to passing it to Linux and additional functionality
> >> within the kernel when OF_OVERLAY is enabled.
> >>
> >> Cc: Jason Kridner <jkridner@beagleboard.org>
> >> Cc: Drew Fustini <drew@beagleboard.org>
> >> Cc: Robert Nelson <robertcnelson@gmail.com>
> >> Cc: Lokesh Vutla <lokeshvutla@ti.com>
> >> Cc: Frank Rowand <frowand.list@gmail.com>
> >> Cc: Rob Herring <robh+dt@kernel.org>
> >> Cc: Mark Rutland <mark.rutland@arm.com>
> >> Cc: Russell King <linux@armlinux.org.uk>
> >> Cc: devicetree@vger.kernel.org
> >> Cc: linux-arm-kernel@lists.infradead.org
> >> Cc: linux-kernel@vger.kernel.org
> >> Signed-off-by: Tom Rini <trini@konsulko.com>
> >> ---
> >> This patch takes the path that Rob encouraged in my previous patch of
> >> enabling __symbols__ in some platforms now (that can use it) and see if
> >> a critical mass evolves that pushes towards -@ being default for all
> >> dtbs.  I would suggest that the dra76 series be respun to include a hunk
> >> like this at least as well, and if there's another Beagle X15 patch,
> >> that too.  Russell, per some of our conversations, something like would
> >> also be needed as part of using overlays to solve some of the problems
> >> with Hummingboard, etc.
> >> ---
> >>  arch/arm/boot/dts/Makefile | 14 ++++++++++++++
> >>  1 file changed, 14 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> >> index 4b17f35dc9a7..6f98422ca00e 100644
> >> --- a/arch/arm/boot/dts/Makefile
> >> +++ b/arch/arm/boot/dts/Makefile
> >> @@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
> >>  
> >>  always		:= $(dtb-y)
> >>  clean-files	:= *.dtb
> >> +
> >> +# enable creation of __symbols__ node
> >> +DTC_FLAGS_am335x-bone += -@
> >> +DTC_FLAGS_am335x-boneblack += -@
> >> +DTC_FLAGS_am335x-boneblack-wireless += -@
> >> +DTC_FLAGS_am335x-boneblue += -@
> >> +DTC_FLAGS_am335x-bonegreen += -@
> >> +DTC_FLAGS_am335x-bonegreen-wireless += -@
> >> +DTC_FLAGS_am57xx-beagle-x15 += -@
> >> +DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
> >> +DTC_FLAGS_dra7-evm += -@
> >> +DTC_FLAGS_dra72-evm += -@
> >> +DTC_FLAGS_dra72-evm-revc += -@
> >> +DTC_FLAGS_dra71-evm += -@
> >>
> > 
> > I would prefer that instead of "-@", a configurable value be used.
> 
> I stated that poorly.  It was intended conceptually, not literally.
> 
> One possible concrete implementation would be to use something other
> than DTC_FLAGS, for example DTC_FLAGS_EXTRA, then have the build
> system choose whether to fold DTC_FLAGS_EXTRA into DTC_FLAGS, based
> on some sort of configurable value.

So you would have to pass in a flag, and then set a CONFIG option for
"please use this flag I just explicitly set" ?

-- 
Tom

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms
  2017-08-17  0:33     ` Tom Rini
@ 2017-08-17  6:15       ` Frank Rowand
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Rowand @ 2017-08-17  6:15 UTC (permalink / raw)
  To: Tom Rini
  Cc: devicetree, Tero Kristo, Nishanth Menon, Tomi Valkeinen,
	Sekhar Nori, Jason Kridner, Drew Fustini, Robert Nelson,
	Lokesh Vutla, Rob Herring, Mark Rutland, Russell King,
	linux-arm-kernel, linux-kernel

On 08/16/17 17:33, Tom Rini wrote:
> On Wed, Aug 16, 2017 at 03:57:21PM -0700, Frank Rowand wrote:
>> On 08/16/17 15:33, Frank Rowand wrote:
>>> On 08/16/17 14:59, Tom Rini wrote:
>>>> Build the dtb file for these platfroms with __symbol__ information
>>>> included.  This will reduce the size of the dtb (and resident memory
>>>
>>> typo: reduce the size should be increase the size
>>>
>>>
>>>> usage) in exchange for allowing more types of overlays to be applied to
>>>> the dtb file prior to passing it to Linux and additional functionality
>>>> within the kernel when OF_OVERLAY is enabled.
>>>>
>>>> Cc: Jason Kridner <jkridner@beagleboard.org>
>>>> Cc: Drew Fustini <drew@beagleboard.org>
>>>> Cc: Robert Nelson <robertcnelson@gmail.com>
>>>> Cc: Lokesh Vutla <lokeshvutla@ti.com>
>>>> Cc: Frank Rowand <frowand.list@gmail.com>
>>>> Cc: Rob Herring <robh+dt@kernel.org>
>>>> Cc: Mark Rutland <mark.rutland@arm.com>
>>>> Cc: Russell King <linux@armlinux.org.uk>
>>>> Cc: devicetree@vger.kernel.org
>>>> Cc: linux-arm-kernel@lists.infradead.org
>>>> Cc: linux-kernel@vger.kernel.org
>>>> Signed-off-by: Tom Rini <trini@konsulko.com>
>>>> ---
>>>> This patch takes the path that Rob encouraged in my previous patch of
>>>> enabling __symbols__ in some platforms now (that can use it) and see if
>>>> a critical mass evolves that pushes towards -@ being default for all
>>>> dtbs.  I would suggest that the dra76 series be respun to include a hunk
>>>> like this at least as well, and if there's another Beagle X15 patch,
>>>> that too.  Russell, per some of our conversations, something like would
>>>> also be needed as part of using overlays to solve some of the problems
>>>> with Hummingboard, etc.
>>>> ---
>>>>  arch/arm/boot/dts/Makefile | 14 ++++++++++++++
>>>>  1 file changed, 14 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>>>> index 4b17f35dc9a7..6f98422ca00e 100644
>>>> --- a/arch/arm/boot/dts/Makefile
>>>> +++ b/arch/arm/boot/dts/Makefile
>>>> @@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
>>>>  
>>>>  always		:= $(dtb-y)
>>>>  clean-files	:= *.dtb
>>>> +
>>>> +# enable creation of __symbols__ node
>>>> +DTC_FLAGS_am335x-bone += -@
>>>> +DTC_FLAGS_am335x-boneblack += -@
>>>> +DTC_FLAGS_am335x-boneblack-wireless += -@
>>>> +DTC_FLAGS_am335x-boneblue += -@
>>>> +DTC_FLAGS_am335x-bonegreen += -@
>>>> +DTC_FLAGS_am335x-bonegreen-wireless += -@
>>>> +DTC_FLAGS_am57xx-beagle-x15 += -@
>>>> +DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
>>>> +DTC_FLAGS_dra7-evm += -@
>>>> +DTC_FLAGS_dra72-evm += -@
>>>> +DTC_FLAGS_dra72-evm-revc += -@
>>>> +DTC_FLAGS_dra71-evm += -@
>>>>
>>>
>>> I would prefer that instead of "-@", a configurable value be used.
>>
>> I stated that poorly.  It was intended conceptually, not literally.
>>
>> One possible concrete implementation would be to use something other
>> than DTC_FLAGS, for example DTC_FLAGS_EXTRA, then have the build
>> system choose whether to fold DTC_FLAGS_EXTRA into DTC_FLAGS, based
>> on some sort of configurable value.
> 
> So you would have to pass in a flag, and then set a CONFIG option for
> "please use this flag I just explicitly set" ?

I'm aware there is some ugliness there, and still open to someone having
a better idea that we have not yet considered.

But yes, the desired functionality over rides the ugliness.  Forcing the
overhead for all users of the board, even those who will never use an
overlay is not a good choice.  The ability to opt out is important.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-17  6:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 21:59 [PATCH] ARM: dts: TI: Enable __symbols__ in dtb files for some platforms Tom Rini
2017-08-16 22:33 ` Frank Rowand
2017-08-16 22:57   ` Frank Rowand
2017-08-17  0:33     ` Tom Rini
2017-08-17  6:15       ` Frank Rowand

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).