aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vdso64/clock_gettime.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/vdso64/clock_gettime.S')
-rw-r--r--arch/s390/kernel/vdso64/clock_gettime.S24
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S
index d46c95ed5f19..91940ed33a4a 100644
--- a/arch/s390/kernel/vdso64/clock_gettime.S
+++ b/arch/s390/kernel/vdso64/clock_gettime.S
@@ -22,7 +22,9 @@ __kernel_clock_gettime:
22 larl %r5,_vdso_data 22 larl %r5,_vdso_data
23 cghi %r2,__CLOCK_REALTIME 23 cghi %r2,__CLOCK_REALTIME
24 je 4f 24 je 4f
25 cghi %r2,-2 /* CLOCK_THREAD_CPUTIME_ID for this thread */ 25 cghi %r2,__CLOCK_THREAD_CPUTIME_ID
26 je 9f
27 cghi %r2,-2 /* Per-thread CPUCLOCK with PID=0, VIRT=1 */
26 je 9f 28 je 9f
27 cghi %r2,__CLOCK_MONOTONIC 29 cghi %r2,__CLOCK_MONOTONIC
28 jne 12f 30 jne 12f
@@ -34,14 +36,13 @@ __kernel_clock_gettime:
34 tmll %r4,0x0001 /* pending update ? loop */ 36 tmll %r4,0x0001 /* pending update ? loop */
35 jnz 0b 37 jnz 0b
36 stck 48(%r15) /* Store TOD clock */ 38 stck 48(%r15) /* Store TOD clock */
39 lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
40 lg %r0,__VDSO_WTOM_SEC(%r5)
37 lg %r1,48(%r15) 41 lg %r1,48(%r15)
38 sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ 42 sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */
39 msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ 43 msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */
40 srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ 44 alg %r1,__VDSO_WTOM_NSEC(%r5)
41 alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ 45 srlg %r1,%r1,0(%r2) /* >> tk->shift */
42 lg %r0,__VDSO_XTIME_SEC(%r5)
43 alg %r1,__VDSO_WTOM_NSEC(%r5) /* + wall_to_monotonic */
44 alg %r0,__VDSO_WTOM_SEC(%r5)
45 clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ 46 clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */
46 jne 0b 47 jne 0b
47 larl %r5,13f 48 larl %r5,13f
@@ -62,12 +63,13 @@ __kernel_clock_gettime:
62 tmll %r4,0x0001 /* pending update ? loop */ 63 tmll %r4,0x0001 /* pending update ? loop */
63 jnz 5b 64 jnz 5b
64 stck 48(%r15) /* Store TOD clock */ 65 stck 48(%r15) /* Store TOD clock */
66 lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */
65 lg %r1,48(%r15) 67 lg %r1,48(%r15)
66 sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ 68 sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */
67 msgf %r1,__VDSO_NTP_MULT(%r5) /* * NTP adjustment */ 69 msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */
68 srlg %r1,%r1,12 /* cyc2ns(clock,cycle_delta) */ 70 alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */
69 alg %r1,__VDSO_XTIME_NSEC(%r5) /* + xtime */ 71 srlg %r1,%r1,0(%r2) /* >> tk->shift */
70 lg %r0,__VDSO_XTIME_SEC(%r5) 72 lg %r0,__VDSO_XTIME_SEC(%r5) /* tk->xtime_sec */
71 clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */ 73 clg %r4,__VDSO_UPD_COUNT(%r5) /* check update counter */
72 jne 5b 74 jne 5b
73 larl %r5,13f 75 larl %r5,13f