Reviewed-by: Petri Savolainen <petri.savolai...@linaro.org>

> -----Original Message-----
> From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of Brian
> Brooks
> Sent: Monday, June 26, 2017 9:21 PM
> To: lng-odp@lists.linaro.org
> Subject: [lng-odp] [PATCH] linux-gen: time: use true hz
> 
> Use true hz value instead of dividing by 10.
> 
> The architected timer in ARM SoCs generally have a lower
> frequency than IA TSC. It is detrimental to divide the
> hertz by ten in this case. This is causing time validation
> failures on ARM systems where the architected timer runs
> at 50MHz.
> 
> Signed-off-by: Brian Brooks <brian.bro...@arm.com>
> ---
>  platform/linux-generic/odp_time.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/platform/linux-generic/odp_time.c b/platform/linux-
> generic/odp_time.c
> index 2bbe5666..a831cc51 100644
> --- a/platform/linux-generic/odp_time.c
> +++ b/platform/linux-generic/odp_time.c
> @@ -102,9 +102,7 @@ static inline odp_time_t time_hw_cur(void)
> 
>  static inline uint64_t time_hw_res(void)
>  {
> -     /* Promise a bit lower resolution than average cycle counter
> -      * frequency */
> -     return global.hw_freq_hz / 10;
> +     return global.hw_freq_hz;
>  }
> 
>  static inline uint64_t time_hw_to_ns(odp_time_t time)
> --
> 2.13.1

Reply via email to