Subject: Re: [PATCH 15/19] bootwrapper: Add initrd information to the device tree in ft_finalize().

From: David Gibson <[email-masked]>
Date: Tue, 13 Feb 2007 15:29:37 +1100

On Mon, Feb 12, 2007 at 10:42:13AM -0600, Scott Wood wrote:
> Mark A. Greer wrote:
> >>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.
> 
> cuboot has its own dt_ops.finalize, which calls ft_finalize, and 
> relocates the tree to someplace that won't get overwritten by the kernel 
> relocation.

Why is cuboot's malloc() allocating the flat tree in a place that's in
danger of being clobbered by the kernel in the first 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