File tree Expand file tree Collapse file tree 1 file changed +2
-20
lines changed
arch/arm64/include/asm/vdso Expand file tree Collapse file tree 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change 88#ifndef __ASSEMBLY__
99
1010#include <asm/alternative.h>
11+ #include <asm/arch_timer.h>
1112#include <asm/barrier.h>
1213#include <asm/unistd.h>
1314#include <asm/sysreg.h>
@@ -69,8 +70,6 @@ int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts)
6970static __always_inline u64 __arch_get_hw_counter (s32 clock_mode ,
7071 const struct vdso_time_data * vd )
7172{
72- u64 res ;
73-
7473 /*
7574 * Core checks for mode already, so this raced against a concurrent
7675 * update. Return something. Core will do another round and then
@@ -79,24 +78,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode,
7978 if (clock_mode == VDSO_CLOCKMODE_NONE )
8079 return 0 ;
8180
82- /*
83- * If FEAT_ECV is available, use the self-synchronizing counter.
84- * Otherwise the isb is required to prevent that the counter value
85- * is speculated.
86- */
87- asm volatile (
88- ALTERNATIVE ("isb\n"
89- "mrs %0, cntvct_el0" ,
90- "nop\n"
91- __mrs_s ("%0" , SYS_CNTVCTSS_EL0 ),
92- ARM64_HAS_ECV )
93- : "=r" (res )
94- :
95- : "memory" );
96-
97- arch_counter_enforce_ordering (res );
98-
99- return res ;
81+ return __arch_counter_get_cntvct ();
10082}
10183
10284#endif /* !__ASSEMBLY__ */
You can’t perform that action at this time.
0 commit comments