From 03cc87cd22332818500ab381e68f6715e4f2facf Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Wed, 22 Apr 2026 17:10:26 +0300 Subject: [PATCH] linux-gen: time: remove memory clobber from aarch64 cntvct_el0 read Remove unnecessary compiler memory barrier from aarch64 cntvct_el0 read in _odp_time_cpu_global() function, which is used to implement non-strict odp_cpu_cycles(), odp_time_local(), and odp_time_global() API functions. It's enough to have the memory clobber in _odp_time_cpu_global_strict(), which is used to implement the strict functions variants. Signed-off-by: Matias Elo Reviewed-by: Janne Peltonen --- platform/linux-generic/arch/aarch64/odp/api/abi/time_cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/linux-generic/arch/aarch64/odp/api/abi/time_cpu.h b/platform/linux-generic/arch/aarch64/odp/api/abi/time_cpu.h index ff8133ec95c..43a45e39d25 100644 --- a/platform/linux-generic/arch/aarch64/odp/api/abi/time_cpu.h +++ b/platform/linux-generic/arch/aarch64/odp/api/abi/time_cpu.h @@ -15,7 +15,7 @@ static inline uint64_t _odp_time_cpu_global(void) { uint64_t cntvct; - __asm__ volatile("mrs %0, cntvct_el0" : "=r"(cntvct) : : "memory"); + __asm__ volatile("mrs %0, cntvct_el0" : "=r"(cntvct)); return cntvct; }