]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ARM: vdso: Compile high resolution parts conditionally
authorThomas Gleixner <tglx@linutronix.de>
Fri, 7 Feb 2020 12:38:51 +0000 (13:38 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Feb 2020 13:40:21 +0000 (14:40 +0100)
If the architected timer is disabled in the kernel configuration then let
the core VDSO code drop the high resolution parts at compile time.

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/20200207124402.622587341@linutronix.de
arch/arm/include/asm/vdso/gettimeofday.h

index fe6e1f65932d5fb363629a206d5e6cf18220f5b4..f4757d327f432ed8986ea653c9cf1003d3c12556 100644 (file)
@@ -106,6 +106,12 @@ static __always_inline int clock_getres32_fallback(
        return ret;
 }
 
+static inline bool arm_vdso_hres_capable(void)
+{
+       return IS_ENABLED(CONFIG_ARM_ARCH_TIMER);
+}
+#define __arch_vdso_hres_capable arm_vdso_hres_capable
+
 static __always_inline u64 __arch_get_hw_counter(int clock_mode)
 {
 #ifdef CONFIG_ARM_ARCH_TIMER