Skip to content

Commit

Permalink
MIPS: vdso: Compile high resolution parts conditionally
Browse files Browse the repository at this point in the history
If neither the R4K nor the GIC timer is enabled 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>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lkml.kernel.org/r/20200207124402.714585315@linutronix.de
  • Loading branch information
Thomas Gleixner committed Feb 17, 2020
1 parent 3280bad commit 25a2a65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/mips/include/asm/vdso/gettimeofday.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
return cycle_now;
}

static inline bool mips_vdso_hres_capable(void)
{
return IS_ENABLED(CONFIG_CSRC_R4K) ||
IS_ENABLED(CONFIG_CLKSRC_MIPS_GIC);
}
#define __arch_vdso_hres_capable mips_vdso_hres_capable

static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
{
return get_vdso_data();
Expand Down

0 comments on commit 25a2a65

Please sign in to comment.