From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: "H. Peter Anvin" <hpa-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [RFC] [PATCH V2] Adding DTB to architecture independent vmlinux
Date: Sat, 30 Oct 2010 23:57:11 +1100 [thread overview]
Message-ID: <20101030125711.GG5250@yookeroo> (raw)
In-Reply-To: <4CCB2E93.2010809-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
On Fri, Oct 29, 2010 at 01:29:07PM -0700, H. Peter Anvin wrote:
> On 10/28/2010 09:04 PM, David Gibson wrote:
> > On Thu, Oct 28, 2010 at 02:44:47PM -0700, H. Peter Anvin wrote:
> >> On 10/28/2010 10:32 AM, David VomLehn wrote:
> >>>
> >>> In my case, where there are a lot of up-front reservations of memory
> >>> at a static address, there is a fair amount of work to do before
> >>> it's possible to do the dynamic address allocation for the blob's
> >>> ultimate destination, but I'm okay with either doing blob size and address
> >>> rounding or copying it from init. I don't see a benefit of supporting
> >>> multiple approaches for Linux.
> >>>
> >>
> >> The reason I mentioned dynamic allocation is that you still need to do
> >> dynamic allocation if you're using a blob from an external source. If
> >> you don't end up with pointers *into* the blob, though, then you don't
> >> need to do the relocation until some time before you jettison the init
> >> section.
> >
> > The way the dtb format is designed, you should almost never work with
> > pointers into the the middle of the blob.
>
> "Almost never"? That scares me when I hear it...
Heh, understandable. So, the dtb format is such that you want to work
with internal offsets most of the time, not pointers into the middle.
Except that of course, you will use transient internal pointers to
grab pieces from the dtb - it's just best to avoid passing them around
whenever you can.
The other case is that once the dtb is "frozen" (no more changes), it
can be useful to keep around pointers to bits of data within the dtb,
rather than duplicating each such thing in its own allocated buffer
somewhere. e.g. I think once we unflatten the tree in powerpc,
property values will still actually point to within the original dtb.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2010-10-30 12:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 14:24 [RFC] [PATCH] Adding DTB to architecture independent vmlinux Dirk Brandewie
[not found] ` <4CC6E491.7060304-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-27 11:09 ` Grant Likely
[not found] ` <20101027110937.GD7822-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-10-27 17:27 ` [sodaville] " H. Peter Anvin
[not found] ` <4CC860EF.6060503-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-10-28 0:30 ` [RFC] [PATCH V2] " Dirk Brandewie
[not found] ` <4CC8C423.9050600-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-10-28 0:57 ` David VomLehn
[not found] ` <20101028005754.GA27386-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>
2010-10-28 15:18 ` H. Peter Anvin
[not found] ` <4CC99441.4030307-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-10-28 16:35 ` [sodaville] " Sebastian Andrzej Siewior
[not found] ` <4CC9A66B.6070408-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-10-28 16:38 ` H. Peter Anvin
[not found] ` <4CC9A705.3080806-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-10-28 18:00 ` David VomLehn
[not found] ` <20101028180053.GC25771-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>
2010-11-01 4:15 ` Grant Likely
[not found] ` <AANLkTinYiTDsN+c_vgnK4OjmjpTzLHyyA8FqjPSaFm5h-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-02 1:27 ` David VomLehn
2010-10-29 4:02 ` David Gibson
2010-10-28 17:32 ` David VomLehn
[not found] ` <20101028173202.GA25771-ZEW99E7oL/EiWxQNNj96ibh/4TqKg8J2XqFh9Ls21Oc@public.gmane.org>
2010-10-28 21:44 ` H. Peter Anvin
[not found] ` <4CC9EECF.9020208-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-10-29 4:04 ` David Gibson
2010-10-29 20:29 ` H. Peter Anvin
[not found] ` <4CCB2E93.2010809-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2010-10-30 12:57 ` David Gibson [this message]
2010-11-01 4:12 ` Grant Likely
2010-11-01 3:55 ` [sodaville] [RFC] [PATCH] " Grant Likely
-- strict thread matches above, loose matches on Subject: below --
2010-10-28 15:26 [RFC] [PATCH V2] " Dirk Brandewie
[not found] ` <4CC99628.6000002-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-01 3:05 ` Grant Likely
2010-11-01 4:02 ` Grant Likely
2010-11-10 6:03 ` Grant Likely
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=20101030125711.GG5250@yookeroo \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=hpa-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.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.