Skip to content

Commit e67ce59

Browse files
committed
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 <matias.elo@nokia.com>
1 parent 7d1695e commit e67ce59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • platform/linux-generic/arch/aarch64/odp/api/abi

platform/linux-generic/arch/aarch64/odp/api/abi/time_cpu.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ static inline uint64_t _odp_time_cpu_global(void)
1515
{
1616
uint64_t cntvct;
1717

18-
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(cntvct) : : "memory");
18+
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(cntvct));
1919

2020
return cntvct;
2121
}

0 commit comments

Comments
 (0)