All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Linux-MIPS <linux-mips@linux-mips.org>,
	Robert Richter <robert.richter@amd.com>,
	chenj@lemote.com
Subject: Re: [PATCH -sfr.git] MIPS: zboot: indent the nop instruction in delay slot
Date: Thu, 29 Oct 2009 13:26:57 +0800	[thread overview]
Message-ID: <1256794017.6448.22.camel@falcon> (raw)
In-Reply-To: <alpine.LFD.2.00.0910290306490.9323@eddie.linux-mips.org>

Hi,

On Thu, 2009-10-29 at 03:12 +0000, Maciej W. Rozycki wrote:
> On Thu, 29 Oct 2009, Wu Zhangjin wrote:
> 
> > diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S
> > index e23f25e..29080f4 100644
> > --- a/arch/mips/boot/compressed/head.S
> > +++ b/arch/mips/boot/compressed/head.S
> > @@ -38,7 +38,7 @@ start:
> >  	PTR_LA	ra, 2f
> >  	PTR_LA	k0, decompress_kernel
> >  	jr	k0
> > -	nop
> > +	 nop
> >  2:
> >  	move	a0, s0
> >  	move	a1, s1
> > @@ -46,7 +46,7 @@ start:
> >  	move	a3, s3
> >  	PTR_LI	k0, KERNEL_ENTRY
> >  	jr	k0
> > -	nop
> > +	 nop
> >  3:
> >  	b 3b

need to add one nop here.

> >  	END(start)
> 
>  This piece of code looks unsafe to me.  I'm not sure which tree this is 
> against and certainly I don't have a local copy of the file,

This is against the of mips-for-linux-next branh of Ralf's
http://www.linux-mips.org/git?p=upstream-sfr.git;a=summary

>  but based on 
> the manual delay slot scheduling this is built with .set noreorder in 
> effect

Yes, there is exactly a ".set noreorder" there:

arch/mips/boot/compressed/head.S:
[...]
 17 
 18         .set noreorder
 19         .cprestore
 20         LEAF(start)
 21 start:
 22         /* Save boot rom start args */
 23         move    s0, a0
 24         move    s1, a1
 25         move    s2, a2
 26         move    s3, a3
 27 
 28         /* Clear BSS */
[...]

>  and as such the function lacks a delay slot fill for the trailing 
> branch (which is also ill-formatted).

A new version will be sent out, thanks!

Regards,
	Wu Zhangjin

      reply	other threads:[~2009-10-29  5:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29  2:10 [PATCH -sfr.git] MIPS: zboot: indent the nop instruction in delay slot Wu Zhangjin
2009-10-29  3:12 ` Maciej W. Rozycki
2009-10-29  5:26   ` Wu Zhangjin [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=1256794017.6448.22.camel@falcon \
    --to=wuzhangjin@gmail.com \
    --cc=chenj@lemote.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=robert.richter@amd.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 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.