diff options
author | 2025-05-27 12:26:54 +0100 | |
---|---|---|
committer | 2025-05-27 12:26:54 +0100 | |
commit | 217e3cbba3d6613bee9ac33ddc330f8676eb9eca (patch) | |
tree | 9f1a9932e5851b286d4bef936888eb585407fede /arch | |
parent | Merge branch 'for-next/sme-fixes' into for-next/core (diff) | |
parent | arm64: vdso: Use __arch_counter_get_cntvct() (diff) | |
download | wireguard-linux-217e3cbba3d6613bee9ac33ddc330f8676eb9eca.tar.xz wireguard-linux-217e3cbba3d6613bee9ac33ddc330f8676eb9eca.zip |
Merge branch 'for-next/vdso' into for-next/core
* for-next/vdso:
arm64: vdso: Use __arch_counter_get_cntvct()
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/include/asm/vdso/gettimeofday.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm64/include/asm/vdso/gettimeofday.h b/arch/arm64/include/asm/vdso/gettimeofday.h index 92a2b59a9f3d..83c315ed5c6e 100644 --- a/arch/arm64/include/asm/vdso/gettimeofday.h +++ b/arch/arm64/include/asm/vdso/gettimeofday.h @@ -8,6 +8,7 @@ #ifndef __ASSEMBLY__ #include <asm/alternative.h> +#include <asm/arch_timer.h> #include <asm/barrier.h> #include <asm/unistd.h> #include <asm/sysreg.h> @@ -69,8 +70,6 @@ int clock_getres_fallback(clockid_t _clkid, struct __kernel_timespec *_ts) static __always_inline u64 __arch_get_hw_counter(s32 clock_mode, const struct vdso_time_data *vd) { - u64 res; - /* * Core checks for mode already, so this raced against a concurrent * 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, if (clock_mode == VDSO_CLOCKMODE_NONE) return 0; - /* - * If FEAT_ECV is available, use the self-synchronizing counter. - * Otherwise the isb is required to prevent that the counter value - * is speculated. - */ - asm volatile( - ALTERNATIVE("isb\n" - "mrs %0, cntvct_el0", - "nop\n" - __mrs_s("%0", SYS_CNTVCTSS_EL0), - ARM64_HAS_ECV) - : "=r" (res) - : - : "memory"); - - arch_counter_enforce_ordering(res); - - return res; + return __arch_counter_get_cntvct(); } #endif /* !__ASSEMBLY__ */ |