diff options
-rw-r--r-- | lib/libc/arm/sys/__vdso_gettc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/arm/sys/__vdso_gettc.c b/lib/libc/arm/sys/__vdso_gettc.c index d75d866..1f43e72 100644 --- a/lib/libc/arm/sys/__vdso_gettc.c +++ b/lib/libc/arm/sys/__vdso_gettc.c @@ -34,8 +34,10 @@ __FBSDID("$FreeBSD$"); #include <sys/time.h> #include <sys/vdso.h> #include <machine/cpufunc.h> +#include <machine/acle-compat.h> #include "libc_private.h" +#if __ARM_ARCH >= 6 static inline uint64_t cp15_cntvct_get(void) { @@ -53,6 +55,7 @@ cp15_cntpct_get(void) __asm __volatile("mrrc\tp15, 0, %Q0, %R0, c14" : "=r" (reg)); return (reg); } +#endif #pragma weak __vdso_gettc u_int @@ -60,6 +63,7 @@ __vdso_gettc(const struct vdso_timehands *th) { uint64_t val; +#if __ARM_ARCH >= 6 /* * Userspace gettimeofday() is only enabled on ARMv7 CPUs, but * libc is compiled for ARMv6. Due to clang issues, .arch @@ -67,6 +71,9 @@ __vdso_gettc(const struct vdso_timehands *th) */ __asm __volatile(".word\t0xf57ff06f" : : : "memory"); /* isb */ val = th->th_physical == 0 ? cp15_cntvct_get() : cp15_cntpct_get(); +#else + val = 0; +#endif return (val); } |