linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@kernel.crashing.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: bug in arch/ppc/boot/common/util.S: cmplwi  cr0,r3,r4 ?
Date: Mon, 8 Aug 2005 17:50:50 -0700	[thread overview]
Message-ID: <20050809005050.GF3187@smtp.west.cox.net> (raw)
In-Reply-To: <1123148649.30257.59.camel@gaston>

On Thu, Aug 04, 2005 at 11:44:08AM +0200, Benjamin Herrenschmidt wrote:
> On Wed, 2005-08-03 at 15:18 +0200, Frank van Maarseveen wrote:
> > I think "cmplwi" expects an immediate vale as last operand
> > around line 255 of arch/ppc/boot/common/util.S:
> > 
> > 	addi	r4,r4,_etext@l		# r8 = &_etext
> > 1:	dcbf	r0,r3			# Flush the data cache
> > 	icbi	r0,r3			# Invalidate the instruction cache
> > 	addi	r3,r3,0x10		# Increment by one cache line
> > 	cmplwi	cr0,r3,r4		# Are we at the end yet?
> > 	               ^^
> > 	blt	1b			# No, keep flushing and invalidating
> > 
> > I guess it should have been:
> > 
> > 	cmplw	cr0,r3,r4		# Are we at the end yet?
> 
> Yup, looks like a real bug to me, Tom ?

Sounds correct to me.  I wonder why the assembler hasn't barfed, or is
is translating the ascii values of r4.  I'll pass this along once 2.6.14
opens just because the code has been that way for so many years, I don't
think it's a critical bug.

-- 
Tom Rini
http://gate.crashing.org/~trini/

  reply	other threads:[~2005-08-09  0:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-03 13:18 bug in arch/ppc/boot/common/util.S: cmplwi cr0,r3,r4 ? Frank van Maarseveen
2005-08-04  9:44 ` Benjamin Herrenschmidt
2005-08-09  0:50   ` Tom Rini [this message]
2005-08-09  2:20     ` Hollis Blanchard
2005-08-09  8:33     ` Benjamin Herrenschmidt

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=20050809005050.GF3187@smtp.west.cox.net \
    --to=trini@kernel.crashing.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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).