[PATCH 6/6] aarch64: Add hp-timing.h
Peter Maydell
peter.maydell@linaro.org
Thu Sep 3 13:49:00 GMT 2015
On 3 September 2015 at 14:17, Marcus Shawcroft
<marcus.shawcroft@gmail.com> wrote:
> There are two ways forward:
>
> 1) Kernel folk agree to expose cntvct_el0 for the benefit of general user space.
>
> 2) We add a HWCAP bit to indicate if cntvct_el0 is exposed.
>
> Taking the proposed patch as it stands in the absence of a commitment
> from the kernel doesn't look sensible to me. Since the loader uses hp
> timers in normal operation we will end up with a dynamic loader that
> faults if a future kernel disables visibility of cntvct_el0.
You need to have the dynamic loader check whether the counter
is available somehow anyway, otherwise it won't work on:
* older kernels that don't export the counter to userspace
* QEMU usermode emulation
* valgrind
* possibly other similar JIT tools
Obviously valgrind/QEMU/etc can be improved to add the counter
support, but there are still going to be old versions out in the
wild.
thanks
-- PMM
More information about the Libc-alpha
mailing list