boot udelay asm fix

Milton Miller miltonm at bga.com
Wed Sep 17 04:54:40 EST 2003


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 at ha
 	lwz	r5,timebase_period_ns at 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/





More information about the Linuxppc-dev mailing list