arm64: vdso: update wtm fields for CLOCK_MONOTONIC_COARSE
authorNathan Lynch <nathan_lynch@mentor.com>
Mon, 3 Feb 2014 19:48:52 +0000 (19:48 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 14 May 2014 11:18:07 +0000 (12:18 +0100)
commit d4022a335271a48cce49df35d825897914fbffe3 upstream.

Update wall-to-monotonic fields in the VDSO data page
unconditionally.  These are used to service CLOCK_MONOTONIC_COARSE,
which is not guarded by use_syscall.

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b666f382900c74f23c78556777041c2ceb7c2b24)
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/arm64/kernel/vdso.c

index 6a389dc1bd499c5de57c1a572bb22fb1a81c1494..0ea7a22bcdf2890b4d363163d89c13ac5a8a80f9 100644 (file)
@@ -235,6 +235,8 @@ void update_vsyscall(struct timekeeper *tk)
        vdso_data->use_syscall                  = use_syscall;
        vdso_data->xtime_coarse_sec             = xtime_coarse.tv_sec;
        vdso_data->xtime_coarse_nsec            = xtime_coarse.tv_nsec;
+       vdso_data->wtm_clock_sec                = tk->wall_to_monotonic.tv_sec;
+       vdso_data->wtm_clock_nsec               = tk->wall_to_monotonic.tv_nsec;
 
        if (!use_syscall) {
                vdso_data->cs_cycle_last        = tk->clock->cycle_last;
@@ -242,8 +244,6 @@ void update_vsyscall(struct timekeeper *tk)
                vdso_data->xtime_clock_nsec     = tk->xtime_nsec;
                vdso_data->cs_mult              = tk->mult;
                vdso_data->cs_shift             = tk->shift;
-               vdso_data->wtm_clock_sec        = tk->wall_to_monotonic.tv_sec;
-               vdso_data->wtm_clock_nsec       = tk->wall_to_monotonic.tv_nsec;
        }
 
        smp_wmb();