boot udelay asm fix

3 messages, 3 authors, 2003-09-17 · open the first message on its own page

boot udelay asm fix

From: Milton Miller <hidden>
Date: 2003-09-16 18:54:40

Hi Tom, Scott

A feature of the assembler is to not check our instruction selection.
Looks like this one gets the rounding wrong without the fix.  Patch
against marcello 2.4 head, but is needed on all trees.

milton

===== arch/ppc/boot/common/util.S 1.5 vs edited =====
--- 1.5/arch/ppc/boot/common/util.S	Mon Sep 15 10:45:58 2003
+++ edited/arch/ppc/boot/common/util.S	Tue Sep 16 13:29:43 2003
@@ -198,7 +198,7 @@
 	 *  timebase_period_ns defaults to 60 (16.6MHz) */
 	lis	r5,timebase_period_ns@ha
 	lwz	r5,timebase_period_ns@l(r5)
-	addi	r4,r4,r5
+	add	r4,r4,r5
 	addi	r4,r4,-1
 	divw	r4,r4,r5	/* BUS ticks */
 1:	mftbu	r5
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: boot udelay asm fix

From: Tom Rini <hidden>
Date: 2003-09-17 15:15:19

On Tue, Sep 16, 2003 at 01:54:40PM -0500, Milton Miller wrote:
Hi Tom, Scott

A feature of the assembler is to not check our instruction selection.
Looks like this one gets the rounding wrong without the fix.  Patch
against marcello 2.4 head, but is needed on all trees.
Fixed in the trees that Linus and Marcelo pull from.  *sigh*.

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

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: boot udelay asm fix

From: Scott Anderson <hidden>
Date: 2003-09-17 21:46:43

On Tue, 2003-09-16 at 11:54, Milton Miller wrote:
A feature of the assembler is to not check our instruction selection.
Looks like this one gets the rounding wrong without the fix.  Patch
against marcello 2.4 head, but is needed on all trees.
Thanks for the catch.  Next time, I swear I'm going to have
gcc generate the assembly for me no matter how simple it is...

Thanks again,
  Scott


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help