x66/vdso: Add CLOCK_TAI support

With the storage array in place it's now trivial to support CLOCK_TAI in
the vdso. Extend the base time storage array and add the update code.

Signed-off-by: Thomas Gleixner <[email protected]>
Tested-by: Matt Rickard <[email protected]>
Acked-by: Andy Lutomirski <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Florian Weimer <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Paolo Bonzini <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Juergen Gross <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
This commit is contained in:
Thomas Gleixner
2018-10-04 23:00:27 +02:00
parent 3e89bf35eb
commit 315f28fa3a
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -51,6 +51,10 @@ void update_vsyscall(struct timekeeper *tk)
base->sec = tk->xtime_sec;
base->nsec = tk->tkr_mono.xtime_nsec;
base = &vdata->basetime[CLOCK_TAI];
base->sec = tk->xtime_sec + (s64)tk->tai_offset;
base->nsec = tk->tkr_mono.xtime_nsec;
base = &vdata->basetime[CLOCK_MONOTONIC];
base->sec = tk->xtime_sec + tk->wall_to_monotonic.tv_sec;
nsec = tk->tkr_mono.xtime_nsec;
+2 -2
View File
@@ -18,8 +18,8 @@ struct vgtod_ts {
u64 nsec;
};
#define VGTOD_BASES (CLOCK_MONOTONIC_COARSE + 1)
#define VGTOD_HRES (BIT(CLOCK_REALTIME) | BIT(CLOCK_MONOTONIC))
#define VGTOD_BASES (CLOCK_TAI + 1)
#define VGTOD_HRES (BIT(CLOCK_REALTIME) | BIT(CLOCK_MONOTONIC) | BIT(CLOCK_TAI))
#define VGTOD_COARSE (BIT(CLOCK_REALTIME_COARSE) | BIT(CLOCK_MONOTONIC_COARSE))
/*