summaryrefslogtreecommitdiff
path: root/kernel/time
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-02-07 15:39:00 +0300
committerThomas Gleixner <tglx@linutronix.de>2020-02-17 22:12:17 +0300
commitc7a18100bdffdff440c7291db6e80863fab0461e (patch)
treeb8a7edb0fa964b98fefd464ad7d69fcd6a2cd7f7 /kernel/time
parentf86fd32db706613fe8d0104057efa6e83e0d7e8f (diff)
downloadlinux-c7a18100bdffdff440c7291db6e80863fab0461e.tar.xz
lib/vdso: Avoid highres update if clocksource is not VDSO capable
If the current clocksource is not VDSO capable there is no point in updating the high resolution parts of the VDSO data. Replace the architecture specific check with a check for a VDSO capable clocksource and skip the update if there is none. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Link: https://lkml.kernel.org/r/20200207124403.563379423@linutronix.de
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/vsyscall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/time/vsyscall.c b/kernel/time/vsyscall.c
index d31a5ef4ade5..54ce6eb2ca36 100644
--- a/kernel/time/vsyscall.c
+++ b/kernel/time/vsyscall.c
@@ -105,10 +105,10 @@ void update_vsyscall(struct timekeeper *tk)
WRITE_ONCE(vdata[CS_HRES_COARSE].hrtimer_res, hrtimer_resolution);
/*
- * Architectures can opt out of updating the high resolution part
- * of the VDSO.
+ * If the current clocksource is not VDSO capable, then spare the
+ * update of the high reolution parts.
*/
- if (__arch_update_vdso_data())
+ if (clock_mode != VDSO_CLOCKMODE_NONE)
update_vdso_data(vdata, tk);
__arch_update_vsyscall(vdata, tk);