提交 634473db 编写于 作者: B Benjamin Herrenschmidt 提交者: Paul Mackerras

[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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 827c1a6c
......@@ -225,9 +225,9 @@ V_FUNCTION_BEGIN(__do_get_xsec)
.cfi_startproc
/* check for update count & load values */
1: ld r8,CFG_TB_UPDATE_COUNT(r3)
andi. r0,r4,1 /* pending update ? loop */
andi. r0,r8,1 /* pending update ? loop */
bne- 1b
xor r0,r4,r4 /* create dependency */
xor r0,r8,r8 /* create dependency */
add r3,r3,r0
/* Get TB & offset it */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册