diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-02-07 13:38:52 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-02-17 14:40:21 +0100 |
commit | 25a2a6567829119f5e3e11eb0ce3d8ae985b6019 (patch) | |
tree | 6142f6123c92091f8be0b6eb3af8751e41a5a743 | |
parent | 3280badbe1b289622ce12b94d064ddb624cbaef1 (diff) | |
download | linux-stable-25a2a6567829119f5e3e11eb0ce3d8ae985b6019.tar.gz linux-stable-25a2a6567829119f5e3e11eb0ce3d8ae985b6019.tar.bz2 linux-stable-25a2a6567829119f5e3e11eb0ce3d8ae985b6019.zip |
MIPS: vdso: Compile high resolution parts conditionally
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
-rw-r--r-- | arch/mips/include/asm/vdso/gettimeofday.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h index a58687e26c5d..a9f846b1a920 100644 --- a/arch/mips/include/asm/vdso/gettimeofday.h +++ b/arch/mips/include/asm/vdso/gettimeofday.h @@ -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(); |