aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 17:05:16 -0400
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 18:01:53 -0400
commitd28ede83791defee9a81e558540699dc46dbbe13 (patch)
tree40df9738db287097241fe25493df982ee33b046f /arch/s390
parent6d3aadf3e180e09dbefab16478c6876b584ce16e (diff)
timekeeping: Create struct tk_read_base and use it in struct timekeeper
The members of the new struct are the required ones for the new NMI safe accessor to clcok monotonic. In order to reuse the existing timekeeping code and to make the update of the fast NMI safe timekeepers a simple memcpy use the struct for the timekeeper as well and convert all users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/time.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 97950f392613..4cef607f3711 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -214,26 +214,26 @@ void update_vsyscall(struct timekeeper *tk)
214{ 214{
215 u64 nsecps; 215 u64 nsecps;
216 216
217 if (tk->clock != &clocksource_tod) 217 if (tk->tkr.clock != &clocksource_tod)
218 return; 218 return;
219 219
220 /* Make userspace gettimeofday spin until we're done. */ 220 /* Make userspace gettimeofday spin until we're done. */
221 ++vdso_data->tb_update_count; 221 ++vdso_data->tb_update_count;
222 smp_wmb(); 222 smp_wmb();
223 vdso_data->xtime_tod_stamp = tk->cycle_last; 223 vdso_data->xtime_tod_stamp = tk->tkr.cycle_last;
224 vdso_data->xtime_clock_sec = tk->xtime_sec; 224 vdso_data->xtime_clock_sec = tk->xtime_sec;
225 vdso_data->xtime_clock_nsec = tk->xtime_nsec; 225 vdso_data->xtime_clock_nsec = tk->tkr.xtime_nsec;
226 vdso_data->wtom_clock_sec = 226 vdso_data->wtom_clock_sec =
227 tk->xtime_sec + tk->wall_to_monotonic.tv_sec; 227 tk->xtime_sec + tk->wall_to_monotonic.tv_sec;
228 vdso_data->wtom_clock_nsec = tk->xtime_nsec + 228 vdso_data->wtom_clock_nsec = tk->tkr.xtime_nsec +
229 + ((u64) tk->wall_to_monotonic.tv_nsec << tk->shift); 229 + ((u64) tk->wall_to_monotonic.tv_nsec << tk->tkr.shift);
230 nsecps = (u64) NSEC_PER_SEC << tk->shift; 230 nsecps = (u64) NSEC_PER_SEC << tk->tkr.shift;
231 while (vdso_data->wtom_clock_nsec >= nsecps) { 231 while (vdso_data->wtom_clock_nsec >= nsecps) {
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 vdso_data->tk_mult = tk->mult; 235 vdso_data->tk_mult = tk->tkr.mult;
236 vdso_data->tk_shift = tk->shift; 236 vdso_data->tk_shift = tk->tkr.shift;
237 smp_wmb(); 237 smp_wmb();
238 ++vdso_data->tb_update_count; 238 ++vdso_data->tb_update_count;
239} 239}