summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vdso64/gettimeofday.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2013-11-22 10:04:53 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-11-25 09:15:39 +0100
commit79c74ecbebf76732f91b82a62ce7fc8a88326962 (patch)
treeaabc8542bfa82067edb563a1de166952058e91d5 /arch/s390/kernel/vdso64/gettimeofday.S
parents390/uaccess: add missing page table walk range check (diff)
downloadlinux-79c74ecbebf76732f91b82a62ce7fc8a88326962.tar.xz
linux-79c74ecbebf76732f91b82a62ce7fc8a88326962.zip
s390/time,vdso: convert to the new update_vsyscall interface
Switch to the improved update_vsyscall interface that provides sub-nanosecond precision for gettimeofday and clock_gettime. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vdso64/gettimeofday.S')
-rw-r--r--arch/s390/kernel/vdso64/gettimeofday.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/s390/kernel/vdso64/gettimeofday.S b/arch/s390/kernel/vdso64/gettimeofday.S
index 36ee674722ec..d0860d1d0ccc 100644
--- a/arch/s390/kernel/vdso64/gettimeofday.S
+++ b/arch/s390/kernel/vdso64/gettimeofday.S
@@ -31,12 +31,13 @@ __kernel_gettimeofday:
stck 48(%r15) /* Store TOD clock */
lg %r1,48(%r15)
sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */
- msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */
- srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */
- alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime.tv_nsec */
- lg %r0,__VDSO_XTIME_SEC(%r5) /* xtime.tv_sec */
+ msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */
+ alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */
+ lg %r0,__VDSO_XTIME_SEC(%r5) /* tk->xtime_sec */
clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */
jne 0b
+ lgf %r5,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
+ srlg %r1,%r1,0(%r5) /* >> tk->shift */
larl %r5,5f
2: clg %r1,0(%r5)
jl 3f