diff options
Diffstat (limited to 'platform/linux-generic/arch/aarch64/odp_global_time.c')
-rw-r--r-- | platform/linux-generic/arch/aarch64/odp_global_time.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/platform/linux-generic/arch/aarch64/odp_global_time.c b/platform/linux-generic/arch/aarch64/odp_global_time.c index fa59f5a15..53561b00c 100644 --- a/platform/linux-generic/arch/aarch64/odp_global_time.c +++ b/platform/linux-generic/arch/aarch64/odp_global_time.c @@ -4,33 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include <odp_posix_extensions.h> - -#include <time.h> - -#include <odp_debug_internal.h> #include <odp/api/abi/cpu_time.h> -#include <odp/visibility_begin.h> - -uint64_t _odp_cpu_global_time(void) -{ - uint64_t cntvct; - - /* - * To be consistent with other architectures, do not issue a - * serializing instruction, e.g. ISB, before reading this - * sys reg. - */ - - /* Memory clobber to minimize optimization around load from sys reg. */ - __asm__ volatile("mrs %0, cntvct_el0" : "=r"(cntvct) : : "memory"); - - return cntvct; -} - -#include <odp/visibility_end.h> - int _odp_cpu_has_global_time(void) { uint64_t hz = _odp_cpu_global_time_freq(); @@ -48,12 +23,3 @@ int _odp_cpu_has_global_time(void) */ return hz >= 1000000 && hz <= 6000000000; } - -uint64_t _odp_cpu_global_time_freq(void) -{ - uint64_t cntfrq; - - __asm__ volatile("mrs %0, cntfrq_el0" : "=r"(cntfrq) : : ); - - return cntfrq; -} |