Re: [patch V2 04/17] ARM: vdso: Compile high resolution parts conditionally

From: Vincenzo Frascino
Date: Fri Feb 14 2020 - 06:55:26 EST


On 2/7/20 12:38 PM, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
>

Reviewed-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
Tested-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>

> ---
> arch/arm/include/asm/vdso/gettimeofday.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> --- a/arch/arm/include/asm/vdso/gettimeofday.h
> +++ b/arch/arm/include/asm/vdso/gettimeofday.h
> @@ -106,6 +106,12 @@ static __always_inline int clock_getres3
> 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
>

--
Regards,
Vincenzo