f-stack/dpdk/lib/librte_eal/common/arch/arm/rte_cycles.c

18 lines
312 B
C
Raw Normal View History

2019-06-25 11:12:58 +00:00
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2015 Cavium, Inc
2017-04-21 10:43:26 +00:00
*/
#include "eal_private.h"
2017-04-21 10:43:26 +00:00
uint64_t
get_tsc_freq_arch(void)
{
#if defined RTE_ARCH_ARM64 && !defined RTE_ARM_EAL_RDTSC_USE_PMU
uint64_t freq;
asm volatile("mrs %0, cntfrq_el0" : "=r" (freq));
return freq;
#else
return 0;
2017-04-21 10:43:26 +00:00
#endif
}