···88#ifndef __ASSEMBLY__991010#include <asm/alternative.h>1111+#include <asm/arch_timer.h>1112#include <asm/barrier.h>1213#include <asm/unistd.h>1314#include <asm/sysreg.h>···7069static __always_inline u64 __arch_get_hw_counter(s32 clock_mode,7170 const struct vdso_time_data *vd)7271{7373- u64 res;7474-7572 /*7673 * Core checks for mode already, so this raced against a concurrent7774 * update. Return something. Core will do another round and then···7879 if (clock_mode == VDSO_CLOCKMODE_NONE)7980 return 0;80818181- /*8282- * If FEAT_ECV is available, use the self-synchronizing counter.8383- * Otherwise the isb is required to prevent that the counter value8484- * is speculated.8585- */8686- asm volatile(8787- ALTERNATIVE("isb\n"8888- "mrs %0, cntvct_el0",8989- "nop\n"9090- __mrs_s("%0", SYS_CNTVCTSS_EL0),9191- ARM64_HAS_ECV)9292- : "=r" (res)9393- :9494- : "memory");9595-9696- arch_counter_enforce_ordering(res);9797-9898- return res;8282+ return __arch_counter_get_cntvct();9983}1008410185#endif /* !__ASSEMBLY__ */