eal/armv8: use high-resolution cycle counter
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Thu, 18 Aug 2016 11:51:30 +0000 (17:21 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 4 Oct 2016 08:43:44 +0000 (10:43 +0200)
commitf91bcbb2d9a6960f8e25c32a455059736c591bf5
tree920e8430bf1a9a178f0399451a50890245b5c3eb
parent6edfa69ba6fe86e9f59c76d0bb3732c558aeedc9
eal/armv8: use high-resolution cycle counter

Existing cntvct_el0 based rte_rdtsc() provides portable
means to get wall clock counter at user space. Typically
it runs at <= 100MHz.

The alternative method to enable rte_rdtsc() for high resolution
wall clock counter is through armv8 PMU subsystem.
The PMU cycle counter runs at CPU frequency, However,
access to PMU cycle counter from user space is not enabled
by default in the arm64 linux kernel.
It is possible to enable cycle counter at user space access
by configuring the PMU from the privileged mode (kernel space).

by default rte_rdtsc() implementation uses portable
cntvct_el0 scheme. Application can choose the PMU based
implementation with CONFIG_RTE_ARM_EAL_RDTSC_USE_PMU

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
lib/librte_eal/common/include/arch/arm/rte_cycles_64.h