diff options
Diffstat (limited to 'arch/x86/kernel/vsyscall_gtod.c')
-rw-r--r-- | arch/x86/kernel/vsyscall_gtod.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/x86/kernel/vsyscall_gtod.c b/arch/x86/kernel/vsyscall_gtod.c index c3cb3c144591..c7d791f32b98 100644 --- a/arch/x86/kernel/vsyscall_gtod.c +++ b/arch/x86/kernel/vsyscall_gtod.c | |||
@@ -31,29 +31,30 @@ void update_vsyscall(struct timekeeper *tk) | |||
31 | gtod_write_begin(vdata); | 31 | gtod_write_begin(vdata); |
32 | 32 | ||
33 | /* copy vsyscall data */ | 33 | /* copy vsyscall data */ |
34 | vdata->vclock_mode = tk->clock->archdata.vclock_mode; | 34 | vdata->vclock_mode = tk->tkr.clock->archdata.vclock_mode; |
35 | vdata->cycle_last = tk->cycle_last; | 35 | vdata->cycle_last = tk->tkr.cycle_last; |
36 | vdata->mask = tk->clock->mask; | 36 | vdata->mask = tk->tkr.mask; |
37 | vdata->mult = tk->mult; | 37 | vdata->mult = tk->tkr.mult; |
38 | vdata->shift = tk->shift; | 38 | vdata->shift = tk->tkr.shift; |
39 | 39 | ||
40 | vdata->wall_time_sec = tk->xtime_sec; | 40 | vdata->wall_time_sec = tk->xtime_sec; |
41 | vdata->wall_time_snsec = tk->xtime_nsec; | 41 | vdata->wall_time_snsec = tk->tkr.xtime_nsec; |
42 | 42 | ||
43 | vdata->monotonic_time_sec = tk->xtime_sec | 43 | vdata->monotonic_time_sec = tk->xtime_sec |
44 | + tk->wall_to_monotonic.tv_sec; | 44 | + tk->wall_to_monotonic.tv_sec; |
45 | vdata->monotonic_time_snsec = tk->xtime_nsec | 45 | vdata->monotonic_time_snsec = tk->tkr.xtime_nsec |
46 | + ((u64)tk->wall_to_monotonic.tv_nsec | 46 | + ((u64)tk->wall_to_monotonic.tv_nsec |
47 | << tk->shift); | 47 | << tk->tkr.shift); |
48 | while (vdata->monotonic_time_snsec >= | 48 | while (vdata->monotonic_time_snsec >= |
49 | (((u64)NSEC_PER_SEC) << tk->shift)) { | 49 | (((u64)NSEC_PER_SEC) << tk->tkr.shift)) { |
50 | vdata->monotonic_time_snsec -= | 50 | vdata->monotonic_time_snsec -= |
51 | ((u64)NSEC_PER_SEC) << tk->shift; | 51 | ((u64)NSEC_PER_SEC) << tk->tkr.shift; |
52 | vdata->monotonic_time_sec++; | 52 | vdata->monotonic_time_sec++; |
53 | } | 53 | } |
54 | 54 | ||
55 | vdata->wall_time_coarse_sec = tk->xtime_sec; | 55 | vdata->wall_time_coarse_sec = tk->xtime_sec; |
56 | vdata->wall_time_coarse_nsec = (long)(tk->xtime_nsec >> tk->shift); | 56 | vdata->wall_time_coarse_nsec = (long)(tk->tkr.xtime_nsec >> |
57 | tk->tkr.shift); | ||
57 | 58 | ||
58 | vdata->monotonic_time_coarse_sec = | 59 | vdata->monotonic_time_coarse_sec = |
59 | vdata->wall_time_coarse_sec + tk->wall_to_monotonic.tv_sec; | 60 | vdata->wall_time_coarse_sec + tk->wall_to_monotonic.tv_sec; |