From: David Gibson <david@gibson.dropbear.id.au>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 15/19] bootwrapper: Add initrd information to the device tree in ft_finalize().
Date: Sat, 10 Feb 2007 11:37:49 +1100 [thread overview]
Message-ID: <20070210003749.GA8276@localhost.localdomain> (raw)
In-Reply-To: <20070209230207.GA12035@mag.az.mvista.com>
On Fri, Feb 09, 2007 at 04:02:07PM -0700, Mark A. Greer wrote:
> On Wed, Feb 07, 2007 at 05:01:40PM -0600, Scott Wood wrote:
>
> Sorry for being so slow on this Scott.
>
> <snip>
>
> > diff --git a/arch/powerpc/boot/flatdevtree_misc.c b/arch/powerpc/boot/flatdevtree_misc.c
> > index 04da38f..39fa010 100644
> > --- a/arch/powerpc/boot/flatdevtree_misc.c
> > +++ b/arch/powerpc/boot/flatdevtree_misc.c
> > @@ -33,8 +33,20 @@ static int ft_setprop(const void *phandl
> > return ft_set_prop(&cxt, phandle, propname, buf, buflen);
> > }
> >
> > -static unsigned long ft_finalize(void)
> > +unsigned long ft_finalize(void)
>
> This is unnecessary. There is already global access from
> dt_ops.finalize.
>
> > {
> > + unsigned long initrd_end = initrd.addr + initrd.size;
> > + void *devp;
> > +
> > + if (initrd.size && (devp = finddevice("/chosen"))) {
> > + setprop(devp, "linux,initrd-start", &initrd.addr,
> > + sizeof(initrd.addr));
> > + setprop(devp, "linux,initrd-end", &initrd_end,
> > + sizeof(initrd_end));
> > +
> > + ft_add_rsvmap(&cxt, initrd.addr, initrd.size);
> > + }
> > +
>
> IMHO, this is a very unnatural place to put this code.
> It really belongs in main.c. That's where all the rest
> of the code that accesses initrd.* is.
Agreed. I have a couple of pending patches that do this in a more
sensible place.
--
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:[~2007-02-10 0:37 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 23:00 [PATCH 00/19] cuboot bootwrapper patchset Scott Wood
2007-02-07 23:01 ` [PATCH 01/19] bootwrapper: Add stddef.h to ops.h Scott Wood
2007-02-07 23:01 ` [PATCH 02/19] bootwrapper: Set -msoft-float and assembler target options Scott Wood
2007-02-07 23:01 ` [PATCH 03/19] bootwrapper: Remove OF-isms Scott Wood
2007-02-07 23:01 ` [PATCH 04/19] bootwrapper: Add ft_root_node() Scott Wood
2007-02-07 23:01 ` [PATCH 05/19] bootwrapper: Rename ft_node_add() to ft_get_phandle() Scott Wood
2007-02-07 23:01 ` [PATCH 06/19] bootwrapper: Make ft_get_phandle() accept and return NULL Scott Wood
2007-02-07 23:01 ` [PATCH 07/19] bootwrapper: Preserve the pp pointer in ft_make_space() when calling ft_reorder() Scott Wood
2007-02-07 23:01 ` [PATCH 08/19] bootwrapper: Modify *pp, not *p, in ft_shuffle() Scott Wood
2007-02-07 23:01 ` [PATCH 09/19] bootwrapper: Rename p and pp to anchor and anchorptr Scott Wood
2007-02-07 23:01 ` [PATCH 10/19] bootwrapper: Use map_string() instead of lookup_string() in ft_prop() Scott Wood
2007-02-07 23:01 ` [PATCH 11/19] bootwrapper: Add ft_find_device_rel() Scott Wood
2007-02-08 1:11 ` David Gibson
2007-02-08 17:14 ` Scott Wood
2007-02-07 23:01 ` [PATCH 12/19] bootwrapper: Refactor ft_get_prop() into internal and external functions Scott Wood
2007-02-07 23:01 ` [PATCH 13/19] bootwrapper: Make ft_get_parent() return a phandle, and NULL if already top-level Scott Wood
2007-02-07 23:01 ` [PATCH 14/19] bootwrapper: Add ft_find_node_by_prop_value() Scott Wood
2007-02-07 23:01 ` [PATCH 15/19] bootwrapper: Add initrd information to the device tree in ft_finalize() Scott Wood
2007-02-09 23:02 ` Mark A. Greer
2007-02-10 0:37 ` David Gibson [this message]
2007-02-12 16:42 ` Scott Wood
2007-02-13 4:29 ` David Gibson
2007-02-13 16:07 ` Scott Wood
2007-02-14 4:43 ` David Gibson
2007-02-07 23:01 ` [PATCH 16/19] bootwrapper: Make ft_create_node() pay attention to the parent parameter Scott Wood
2007-02-07 23:01 ` [PATCH 17/19] bootwrapper: Add dt_ops methods Scott Wood
2007-02-09 23:05 ` Mark A. Greer
2007-02-07 23:01 ` [PATCH 18/19] bootwrapper: Add xlate_reg(), and use it to find serial registers Scott Wood
2007-02-09 23:07 ` Mark A. Greer
2007-02-12 16:45 ` Scott Wood
2007-02-12 21:10 ` Josh Boyer
2007-02-13 4:30 ` David Gibson
2007-02-13 16:00 ` Scott Wood
2007-02-07 23:01 ` [PATCH 19/19] bootwrapper: compatibility layer for old U-Boots (a.k.a. cuImage, cuboot) Scott Wood
2007-02-08 21:15 ` David Gibson
2007-02-09 17:11 ` Scott Wood
2007-02-10 1:02 ` David Gibson
2007-02-12 16:52 ` 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=20070210003749.GA8276@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=mgreer@mvista.com \
--cc=paulus@samba.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 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).