diff options
Diffstat (limited to 'arch/s390/kernel/vdso64/clock_gettime.S')
-rw-r--r-- | arch/s390/kernel/vdso64/clock_gettime.S | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/s390/kernel/vdso64/clock_gettime.S b/arch/s390/kernel/vdso64/clock_gettime.S index 9d9761f8e110..7699e735ae28 100644 --- a/arch/s390/kernel/vdso64/clock_gettime.S +++ b/arch/s390/kernel/vdso64/clock_gettime.S | |||
@@ -19,6 +19,7 @@ | |||
19 | .type __kernel_clock_gettime,@function | 19 | .type __kernel_clock_gettime,@function |
20 | __kernel_clock_gettime: | 20 | __kernel_clock_gettime: |
21 | .cfi_startproc | 21 | .cfi_startproc |
22 | aghi %r15,-16 | ||
22 | larl %r5,_vdso_data | 23 | larl %r5,_vdso_data |
23 | cghi %r2,__CLOCK_REALTIME_COARSE | 24 | cghi %r2,__CLOCK_REALTIME_COARSE |
24 | je 4f | 25 | je 4f |
@@ -37,10 +38,10 @@ __kernel_clock_gettime: | |||
37 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 38 | 0: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
38 | tmll %r4,0x0001 /* pending update ? loop */ | 39 | tmll %r4,0x0001 /* pending update ? loop */ |
39 | jnz 0b | 40 | jnz 0b |
40 | stcke 48(%r15) /* Store TOD clock */ | 41 | stcke 0(%r15) /* Store TOD clock */ |
41 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 42 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
42 | lg %r0,__VDSO_WTOM_SEC(%r5) | 43 | lg %r0,__VDSO_WTOM_SEC(%r5) |
43 | lg %r1,49(%r15) | 44 | lg %r1,1(%r15) |
44 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 45 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
45 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 46 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
46 | alg %r1,__VDSO_WTOM_NSEC(%r5) | 47 | alg %r1,__VDSO_WTOM_NSEC(%r5) |
@@ -56,6 +57,7 @@ __kernel_clock_gettime: | |||
56 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ | 57 | 2: stg %r0,0(%r3) /* store tp->tv_sec */ |
57 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 58 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
58 | lghi %r2,0 | 59 | lghi %r2,0 |
60 | aghi %r15,16 | ||
59 | br %r14 | 61 | br %r14 |
60 | 62 | ||
61 | /* CLOCK_MONOTONIC_COARSE */ | 63 | /* CLOCK_MONOTONIC_COARSE */ |
@@ -82,9 +84,9 @@ __kernel_clock_gettime: | |||
82 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ | 84 | 5: lg %r4,__VDSO_UPD_COUNT(%r5) /* load update counter */ |
83 | tmll %r4,0x0001 /* pending update ? loop */ | 85 | tmll %r4,0x0001 /* pending update ? loop */ |
84 | jnz 5b | 86 | jnz 5b |
85 | stcke 48(%r15) /* Store TOD clock */ | 87 | stcke 0(%r15) /* Store TOD clock */ |
86 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ | 88 | lgf %r2,__VDSO_TK_SHIFT(%r5) /* Timekeeper shift */ |
87 | lg %r1,49(%r15) | 89 | lg %r1,1(%r15) |
88 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ | 90 | sg %r1,__VDSO_XTIME_STAMP(%r5) /* TOD - cycle_last */ |
89 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ | 91 | msgf %r1,__VDSO_TK_MULT(%r5) /* * tk->mult */ |
90 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ | 92 | alg %r1,__VDSO_XTIME_NSEC(%r5) /* + tk->xtime_nsec */ |
@@ -101,6 +103,7 @@ __kernel_clock_gettime: | |||
101 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ | 103 | 7: stg %r0,0(%r3) /* store tp->tv_sec */ |
102 | stg %r1,8(%r3) /* store tp->tv_nsec */ | 104 | stg %r1,8(%r3) /* store tp->tv_nsec */ |
103 | lghi %r2,0 | 105 | lghi %r2,0 |
106 | aghi %r15,16 | ||
104 | br %r14 | 107 | br %r14 |
105 | 108 | ||
106 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ | 109 | /* CLOCK_THREAD_CPUTIME_ID for this thread */ |
@@ -134,11 +137,13 @@ __kernel_clock_gettime: | |||
134 | slgr %r4,%r0 /* r4 = tv_nsec */ | 137 | slgr %r4,%r0 /* r4 = tv_nsec */ |
135 | stg %r4,8(%r3) | 138 | stg %r4,8(%r3) |
136 | lghi %r2,0 | 139 | lghi %r2,0 |
140 | aghi %r15,16 | ||
137 | br %r14 | 141 | br %r14 |
138 | 142 | ||
139 | /* Fallback to system call */ | 143 | /* Fallback to system call */ |
140 | 12: lghi %r1,__NR_clock_gettime | 144 | 12: lghi %r1,__NR_clock_gettime |
141 | svc 0 | 145 | svc 0 |
146 | aghi %r15,16 | ||
142 | br %r14 | 147 | br %r14 |
143 | 148 | ||
144 | 13: .quad 1000000000 | 149 | 13: .quad 1000000000 |