build: rename ppc sub-directories
[dpdk.git] / lib / librte_eal / common / arch / arm / rte_cycles.c
index 851fd02..3500d52 100644 (file)
@@ -1,7 +1,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
 }