arm: vdso: Add support for CLOCK_MONOTONIC_RAW
PATCH v3 6/12 arm: vdso: Add support for CLOCK_MONOTONIC_RAW
Add a case for CLOCK_MONOTONIC_RAW to match up with support that is available in arm64's vdso.
Signed-off-by Mark Salyzyn <[email protected]>
Cc James Morse <[email protected]>
Cc Russell King <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Dmitry Safonov <[email protected]>
Cc John Stultz <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Laura Abbott <[email protected]>
Cc Kees Cook <[email protected]>
Cc Ard Biesheuvel <[email protected]>
Cc Andy Gross <[email protected]>
Cc Kevin Brodsky <[email protected]>
Cc Andrew Pinski <[email protected]>
Cc linux-kernel at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
v2:
- split first CL into 6 of 7 pieces
v3:
- rebase (unchanged)
--- arch/arm/include/asm/vdso_datapage.h | 4 +++ arch/arm/kernel/vdso.c | 5 ++++ arch/arm/vdso/vgettimeofday.c | 51 ++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+)
arch/arm/include/asm/vdso_datapage.h +4 -0
@@ -46,6 +46,10 @@ struct vdso_data {u64 xtime_clock_snsec;/* CLOCK_REALTIME sub-ns base */ u32 tz_minuteswest;/* timezone info for gettimeofday(2) */ u32 tz_dsttime; + +u32 cs_raw_mult;/* Raw clocksource multipler */ +u32 raw_time_sec;/* Raw time */ +u32 raw_time_nsec; };union vdso_data_store {
arch/arm/kernel/vdso.c +5 -0
@@ -335,9 +335,14 @@ void update_vsyscall(struct timekeeper *tk)if (!vdso_data->use_syscall) { vdso_data->cs_cycle_last = tk->tkr_mono.cycle_last; + vdso_data->raw_time_sec = tk->raw_time.tv_sec; + vdso_data->raw_time_nsec = (tk->raw_time.tv_nsec << + tk->raw_time.shift) + + tk->tkr_raw.xtime_nsec; vdso_data->xtime_clock_sec = tk->xtime_sec; vdso_data->xtime_clock_snsec = tk->tkr_mono.xtime_nsec; vdso_data->cs_mono_mult = tk->tkr_mono.mult; + vdso_data->cs_raw_mult = tk->tkr_raw.mult;/* tkr_mono.shift == tkr_raw.shift */ vdso_data->cs_shift = tk->tkr_mono.shift; vdso_data->cs_mask = tk->tkr_mono.mask;
arch/arm/vdso/vgettimeofday.c +51 -0
69 lines not on this page · raw message
Signature · 1 line
2.15.0.rc2.357.g7e34df9404-goog