eal/tile: avoid use of non-upstreamed header
authorChris Metcalf <cmetcalf@mellanox.com>
Sat, 18 Feb 2017 01:52:26 +0000 (20:52 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 27 Feb 2017 15:44:23 +0000 (16:44 +0100)
It's trivial to directly invoke a read of the special-purpose
register that holds the clock cycle counter, so just do that.

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
lib/librte_eal/common/include/arch/tile/rte_cycles.h

index 0b2200a..a87b2f8 100644 (file)
@@ -37,7 +37,7 @@
 extern "C" {
 #endif
 
-#include <arch/cycle.h>
+#include <arch/spr_def.h>
 
 #include "generic/rte_cycles.h"
 
@@ -50,7 +50,7 @@ extern "C" {
 static inline uint64_t
 rte_rdtsc(void)
 {
-       return get_cycle_count();
+       return __insn_mfspr(SPR_CYCLE);
 }
 
 static inline uint64_t