On Wed, Sep 02, 2020 at 02:21:27PM +0100, Leo Yan wrote: > The system register CNTVCT_EL0 can be used to retrieve the counter from > user space. Add rdtsc() for Arm64.
> +u64 rdtsc(void)
> +{
> + u64 val;
Would it make sense to put a comment in that this counter is/could-be
'short' ? Because unlike x86-TSC, this thing isn't architecturally
specified to be 64bits wide.
> + asm volatile("mrs %0, cntvct_el0" : "=r" (val));
> +
> + return val;
> +}
> --
> 2.17.1
>

