linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@samba.org>, linuxppc-dev@ozlabs.org
Subject: Re: Don't pass the stack pointer to zImage's start() function
Date: Thu, 15 Mar 2007 16:18:21 +1100	[thread overview]
Message-ID: <20070315051821.GF14061@localhost.localdomain> (raw)
In-Reply-To: <20070315043546.GE12768@bakeyournoodle.com>

On Thu, Mar 15, 2007 at 03:35:46PM +1100, Tony Breeds wrote:
> On Thu, Mar 15, 2007 at 03:29:04PM +1100, David Gibson wrote:
> > At present, the zImage entry code passes a copy of the stack pointer
> > to the start() function.  There's no real reason for this; the only
> > thing start() does with it is print it out.  It appears to be a
> > leftover debugging hack, so, this patch removes it.
> 
> <snip>
> 
> > --- working-2.6.orig/arch/powerpc/boot/main.c	2007-03-15 14:03:09.000000000 +1100
> > +++ working-2.6/arch/powerpc/boot/main.c	2007-03-15 14:07:05.000000000 +1100
> > @@ -256,7 +256,7 @@ struct dt_ops dt_ops;
> >  struct console_ops console_ops;
> >  struct loader_info loader_info;
> >  
> > -void start(void *sp)
> > +void start(void)
> >  {
> >  	struct addr_range vmlinux, initrd;
> >  	kernel_entry_t kentry;
> > @@ -268,8 +268,7 @@ void start(void *sp)
> >  	if (platform_ops.fixups)
> >  		platform_ops.fixups();
> >  
> > -	printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r",
> > -	       _start, sp);
> > +	printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", _start);
> 
> Shouldn't that be:
> 
> +	printf("\n\rzImage starting: loaded at 0x%p\n\r", _start);
> 
> or similar?

Crap, yes, I suck.

Fixed version coming, plus a patch to turn on gcc printf format
warnings for the zImage.

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

  reply	other threads:[~2007-03-15  5:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-15  4:29 Don't pass the stack pointer to zImage's start() function David Gibson
2007-03-15  4:35 ` Tony Breeds
2007-03-15  5:18   ` David Gibson [this message]
2007-03-16 18:37 ` Olaf Hering
2007-03-16 19:26   ` Josh Boyer
2007-03-16 20:04     ` Olaf Hering

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=20070315051821.GF14061@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --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).