linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] U-boot passes the initrd as start/end, not start/size.
Date: Mon, 14 May 2007 10:22:05 +1000	[thread overview]
Message-ID: <20070514002205.GC6517@localhost.localdomain> (raw)
In-Reply-To: <20070511175202.GA14644@ld0162-tx32.am.freescale.net>

On Fri, May 11, 2007 at 12:52:03PM -0500, Scott Wood wrote:

Patch description would be good.

> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
>  arch/powerpc/boot/cuboot-83xx.c |    2 +-
>  arch/powerpc/boot/cuboot-85xx.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c
> index 6cbc20a..9af554e 100644
> --- a/arch/powerpc/boot/cuboot-83xx.c
> +++ b/arch/powerpc/boot/cuboot-83xx.c
> @@ -57,7 +57,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
>  
>  	memcpy(&bd, (bd_t *)r3, sizeof(bd));
>  	loader_info.initrd_addr = r4;
> -	loader_info.initrd_size = r4 ? r5 : 0;
> +	loader_info.initrd_size = r4 ? r5 - r4 : 0;
>  	loader_info.cmdline = (char *)r6;
>  	loader_info.cmdline_len = r7 - r6;
>  
> diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c
> index f88ba00..e256031 100644
> --- a/arch/powerpc/boot/cuboot-85xx.c
> +++ b/arch/powerpc/boot/cuboot-85xx.c
> @@ -58,7 +58,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
>  
>  	memcpy(&bd, (bd_t *)r3, sizeof(bd));
>  	loader_info.initrd_addr = r4;
> -	loader_info.initrd_size = r4 ? r5 : 0;
> +	loader_info.initrd_size = r4 ? r5 - r4 : 0;
>  	loader_info.cmdline = (char *)r6;
>  	loader_info.cmdline_len = r7 - r6;

Now that cuboot-ebony.c is merged, that should be fixed as well.

We should really think about some macro magic or something to avoid
this duplication of identical-save-for-bd_t's-definition cuboot
handling code.

-- 
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

      parent reply	other threads:[~2007-05-14  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11 17:52 [PATCH] U-boot passes the initrd as start/end, not start/size Scott Wood
2007-05-12  3:45 ` Stephen Rothwell
2007-05-14 15:50   ` Scott Wood
2007-05-14  0:22 ` David Gibson [this message]

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=20070514002205.GC6517@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=scottwood@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 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).