aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vdso64
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-02-25 16:09:00 -0500
committerPaul Mackerras <paulus@samba.org>2006-02-28 00:25:54 -0500
commit634473db86502b6444c3cebd279a06e0b8737527 (patch)
tree15b898352bc7fbfbc1a6cc9ef674eef89313dc59 /arch/powerpc/kernel/vdso64
parent827c1a6c1a5dcb2902fecfb648f9af6a532934eb (diff)
[PATCH] powerpc: vdso 64bits gettimeofday bug
A bug in the assembly code of the vdso can cause gettimeofday() to hang or to return incorrect results. The wrong register was used to test for pending updates of the calibration variables and to create a dependency for subsequent loads. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/vdso64')
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index ccaeda5136d1..4ee871f1cadb 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -225,9 +225,9 @@ V_FUNCTION_BEGIN(__do_get_xsec)
225 .cfi_startproc 225 .cfi_startproc
226 /* check for update count & load values */ 226 /* check for update count & load values */
2271: ld r8,CFG_TB_UPDATE_COUNT(r3) 2271: ld r8,CFG_TB_UPDATE_COUNT(r3)
228 andi. r0,r4,1 /* pending update ? loop */ 228 andi. r0,r8,1 /* pending update ? loop */
229 bne- 1b 229 bne- 1b
230 xor r0,r4,r4 /* create dependency */ 230 xor r0,r8,r8 /* create dependency */
231 add r3,r3,r0 231 add r3,r3,r0
232 232
233 /* Get TB & offset it */ 233 /* Get TB & offset it */