ANDROID: clock_gettime(CLOCK_BOOTTIME,) slows down >20x
[GitHub/exynos8895/android_kernel_samsung_universal8895.git] / arch / arm64 / kernel / vdso.c
index cac59b9b7d744b915f6112e2392e6b4dfeaad93b..72916c2e67107ee7cf93f306740584d17ee326c2 100644 (file)
@@ -329,6 +329,8 @@ void update_vsyscall(struct timekeeper *tk)
        vdso_data->wtm_clock_nsec               = tk->wall_to_monotonic.tv_nsec;
 
        if (!use_syscall) {
+               struct timespec btm = ktime_to_timespec(tk->offs_boot);
+
                /* tkr_mono.cycle_last == tkr_raw.cycle_last */
                vdso_data->cs_cycle_last        = tk->tkr_mono.cycle_last;
                vdso_data->raw_time_sec         = tk->raw_sec;
@@ -340,7 +342,8 @@ void update_vsyscall(struct timekeeper *tk)
                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->btm_nsec             = ktime_to_ns(tk->offs_boot);
+               vdso_data->btm_sec              = btm.tv_sec;
+               vdso_data->btm_nsec             = btm.tv_nsec;
        }
 
        smp_wmb();