All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Timur Tabi <timur@freescale.com>
Cc: 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 08:44:10 +1000	[thread overview]
Message-ID: <1274309050.1931.21.camel@pasglop> (raw)
In-Reply-To: <4BF4593E.8030101@freescale.com>

On Wed, 2010-05-19 at 16:33 -0500, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> >> So to accommodate future boards where more padding is needed, we make the
> >> option for the -p parameter configurable.
> > 
> > Can't u-boot just allocate more space ?
> 
> Yes and no.  U-Boot has functions to increase the size of an fdt, but these
> functions can't be sure that the fdt will grow beyond its allocated space.
> So if U-Boot calls fdt_setprop() or fdt_add_subnode(), and there isn't
> enough space in the fdt, those functions will return with an error.

 .../...

It's still not kernel business to have to deal with u-boot memory
allocation constraints. The padding in the kernel built is intended to
make space for DT changes done by 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).

Ben.

WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
To: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: 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 08:44:10 +1000	[thread overview]
Message-ID: <1274309050.1931.21.camel@pasglop> (raw)
In-Reply-To: <4BF4593E.8030101-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

On Wed, 2010-05-19 at 16:33 -0500, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> >> So to accommodate future boards where more padding is needed, we make the
> >> option for the -p parameter configurable.
> > 
> > Can't u-boot just allocate more space ?
> 
> Yes and no.  U-Boot has functions to increase the size of an fdt, but these
> functions can't be sure that the fdt will grow beyond its allocated space.
> So if U-Boot calls fdt_setprop() or fdt_add_subnode(), and there isn't
> enough space in the fdt, those functions will return with an error.

 .../...

It's still not kernel business to have to deal with u-boot memory
allocation constraints. The padding in the kernel built is intended to
make space for DT changes done by 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).

Ben.

  reply	other threads:[~2010-05-19 22:44 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 [this message]
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
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=1274309050.1931.21.camel@pasglop \
    --to=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.