From: Scott Wood <scottwood@freescale.com>
To: Timur Tabi <timur@freescale.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@ozlabs.org, devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: make the padding for the device tree a configurable option
Date: Thu, 20 May 2010 11:04:29 -0500 [thread overview]
Message-ID: <4BF55D8D.5070801@freescale.com> (raw)
In-Reply-To: <20100520011820.GT25892@yookeroo>
On 05/19/2010 08:18 PM, David Gibson wrote:
> On Wed, May 19, 2010 at 07:03:17PM -0500, Timur Tabi wrote:
>> On Wed, May 19, 2010 at 5:44 PM, Benjamin Herrenschmidt
>>> The padding in the kernel built is intended to
>>> make space for DT changes done by the zImage wrapper.
>>
>> Well, okay. I think it would be nice if we expanded that to handle
>> general usage.
Don't we have dynamic expansion in the zImage wrapper?
>>> Maybe we could add to libfdt a way to provide a realloc() callback to it
>>> when it hits the max size, and uboot can then move things around (or
>>> fail).
>>
>> The problem is that the code which allocates a block for the fdt is
>> completely distinct from the code that manipulates the fdt. We'd need
>> to put in either some kind of funky callback mechanism, or insist that
>> every fdt exist in a block of memory allocated by some specific method
>> (e.g. lmb).
>>
>> I'm stuck between a rock and a hard place, it seems. No one is
>> willing to compromise on any of my ideas. It's hard to convince our
>> BSP developers that they should be pushing more code upstream when I
>> get so much resistance for a such a mundane change.
>
> Couldn't you use the configurable padding, but put the stuff to do it
> into u-boot. i.e. repad the dtb at u-boot build time, rather than
> u-boot runtime.
Currently generating a dtb is not done as part of the u-boot build
process -- and apparently some people are using the Linux makefile
target to do it.
I think the right thing is to do whatever we need to do in u-boot to get
dynamic expansion fully working (it already does it in some
circumstances, just not always, or necessarily safely). Static padding
is too fragile.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
Benjamin Herrenschmidt
<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] powerpc: make the padding for the device tree a configurable option
Date: Thu, 20 May 2010 11:04:29 -0500 [thread overview]
Message-ID: <4BF55D8D.5070801@freescale.com> (raw)
In-Reply-To: <20100520011820.GT25892@yookeroo>
On 05/19/2010 08:18 PM, David Gibson wrote:
> On Wed, May 19, 2010 at 07:03:17PM -0500, Timur Tabi wrote:
>> On Wed, May 19, 2010 at 5:44 PM, Benjamin Herrenschmidt
>>> The padding in the kernel built is intended to
>>> make space for DT changes done by the zImage wrapper.
>>
>> Well, okay. I think it would be nice if we expanded that to handle
>> general usage.
Don't we have dynamic expansion in the zImage wrapper?
>>> Maybe we could add to libfdt a way to provide a realloc() callback to it
>>> when it hits the max size, and uboot can then move things around (or
>>> fail).
>>
>> The problem is that the code which allocates a block for the fdt is
>> completely distinct from the code that manipulates the fdt. We'd need
>> to put in either some kind of funky callback mechanism, or insist that
>> every fdt exist in a block of memory allocated by some specific method
>> (e.g. lmb).
>>
>> I'm stuck between a rock and a hard place, it seems. No one is
>> willing to compromise on any of my ideas. It's hard to convince our
>> BSP developers that they should be pushing more code upstream when I
>> get so much resistance for a such a mundane change.
>
> Couldn't you use the configurable padding, but put the stuff to do it
> into u-boot. i.e. repad the dtb at u-boot build time, rather than
> u-boot runtime.
Currently generating a dtb is not done as part of the u-boot build
process -- and apparently some people are using the Linux makefile
target to do it.
I think the right thing is to do whatever we need to do in u-boot to get
dynamic expansion fully working (it already does it in some
circumstances, just not always, or necessarily safely). Static padding
is too fragile.
-Scott
next prev parent reply other threads:[~2010-05-20 16:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 19:53 [PATCH] powerpc: make the padding for the device tree a configurable option Timur Tabi
2010-05-19 19:53 ` Timur Tabi
2010-05-19 21:20 ` Benjamin Herrenschmidt
2010-05-19 21:20 ` Benjamin Herrenschmidt
2010-05-19 21:33 ` Timur Tabi
2010-05-19 21:33 ` Timur Tabi
2010-05-19 22:44 ` Benjamin Herrenschmidt
2010-05-19 22:44 ` Benjamin Herrenschmidt
2010-05-20 0:03 ` Timur Tabi
2010-05-20 0:03 ` Timur Tabi
2010-05-20 0:23 ` Benjamin Herrenschmidt
2010-05-20 0:23 ` Benjamin Herrenschmidt
2010-05-20 0:36 ` M. Warner Losh
2010-05-20 0:36 ` M. Warner Losh
2010-05-20 1:18 ` David Gibson
2010-05-20 1:18 ` David Gibson
2010-05-20 1:46 ` Timur Tabi
2010-05-20 1:46 ` Timur Tabi
2010-05-20 6:17 ` David Gibson
2010-05-20 6:17 ` David Gibson
2010-05-20 11:40 ` Timur Tabi
2010-05-20 11:40 ` Timur Tabi
2010-05-20 16:04 ` Scott Wood [this message]
2010-05-20 16:04 ` Scott Wood
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=4BF55D8D.5070801@freescale.com \
--to=scottwood@freescale.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=timur@freescale.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.