Skip to content

Commit

Permalink
ARM: vdso: Compile high resolution parts conditionally
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Vincenzo Frascino <[email protected]>
Reviewed-by: Vincenzo Frascino <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
KAGA-KOKO committed Feb 17, 2020
1 parent 1dff415 commit 3280bad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/include/asm/vdso/gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3280bad

Please sign in to comment.