]> git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/dpdk/lib/librte_eal/common/arch/arm/rte_cycles.c
import 15.2.0 Octopus source
[ceph.git] / ceph / src / seastar / dpdk / lib / librte_eal / common / arch / arm / rte_cycles.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2015 Cavium, Inc
3 */
4
5 #include "eal_private.h"
6
7 uint64_t
8 get_tsc_freq_arch(void)
9 {
10 #if defined RTE_ARCH_ARM64 && !defined RTE_ARM_EAL_RDTSC_USE_PMU
11 uint64_t freq;
12 asm volatile("mrs %0, cntfrq_el0" : "=r" (freq));
13 return freq;
14 #else
15 return 0;
16 #endif
17 }