diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-08-29 06:31:45 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-09-09 02:53:27 -0400 |
commit | b7eacb59cd7fb5e98852186e485c0c865f862645 (patch) | |
tree | 79020288a93eb3abfa3de29c44735958e7c3655e /arch/s390/kernel/time.c | |
parent | 070b7be633dc33c0899e8c934b4d5fad046b06e8 (diff) |
s390/vdso: add vdso support for coarse clocks
Add CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE optimization to
the 64-bit and 31-bit vdso.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/time.c')
-rw-r--r-- | arch/s390/kernel/time.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 4cef607f3711..69e980de0f62 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -232,6 +232,19 @@ void update_vsyscall(struct timekeeper *tk) | |||
232 | vdso_data->wtom_clock_nsec -= nsecps; | 232 | vdso_data->wtom_clock_nsec -= nsecps; |
233 | vdso_data->wtom_clock_sec++; | 233 | vdso_data->wtom_clock_sec++; |
234 | } | 234 | } |
235 | |||
236 | vdso_data->xtime_coarse_sec = tk->xtime_sec; | ||
237 | vdso_data->xtime_coarse_nsec = | ||
238 | (long)(tk->tkr.xtime_nsec >> tk->tkr.shift); | ||
239 | vdso_data->wtom_coarse_sec = | ||
240 | vdso_data->xtime_coarse_sec + tk->wall_to_monotonic.tv_sec; | ||
241 | vdso_data->wtom_coarse_nsec = | ||
242 | vdso_data->xtime_coarse_nsec + tk->wall_to_monotonic.tv_nsec; | ||
243 | while (vdso_data->wtom_coarse_nsec >= NSEC_PER_SEC) { | ||
244 | vdso_data->wtom_coarse_nsec -= NSEC_PER_SEC; | ||
245 | vdso_data->wtom_coarse_sec++; | ||
246 | } | ||
247 | |||
235 | vdso_data->tk_mult = tk->tkr.mult; | 248 | vdso_data->tk_mult = tk->tkr.mult; |
236 | vdso_data->tk_shift = tk->tkr.shift; | 249 | vdso_data->tk_shift = tk->tkr.shift; |
237 | smp_wmb(); | 250 | smp_wmb(); |