[PATCH] ppc64: Fix error in vDSO 32 bits date

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Oct 19 10:59:05 EST 2005


The implementation of __kernel_gettimeofday() in the 32 bits vDOS has a
small bug (a typo actually) that will cause it to lose 1 bit of
precision. Not terribly bad but worth fixing.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>

Index: linux-work/arch/ppc64/kernel/vdso32/gettimeofday.S
===================================================================
--- linux-work.orig/arch/ppc64/kernel/vdso32/gettimeofday.S	2005-10-13 13:45:54.000000000 +1000
+++ linux-work/arch/ppc64/kernel/vdso32/gettimeofday.S	2005-10-19 10:59:09.000000000 +1000
@@ -109,7 +109,7 @@
 	lwz	r6,(CFG_TB_TO_XS+4)(r9)
 	mulhwu	r4,r7,r5
 	mulhwu	r6,r7,r6
-	mullw	r6,r7,r5
+	mullw	r0,r7,r5
 	addc	r6,r6,r0
 
 	/* At this point, we have the scaled xsec value in r4 + XER:CA





More information about the Linuxppc64-dev mailing list