aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_eal/common/arch/arm/rte_cycles.c
blob: 3500d523efde6993de12370ab06363afa0c1e148 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2015 Cavium, Inc
 */

#include "eal_private.h"

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;
#endif
}