Thread (11 messages) 11 messages, 5 authors, 2017-02-27
STALE3439d

[PATCH 1/4] tile: avoid use of non-upstreamed <arch/cycle.h>

From: Chris Metcalf <hidden>
Date: 2017-02-18 01:52:58
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

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 <redacted>
---
 lib/librte_eal/common/include/arch/tile/rte_cycles.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/common/include/arch/tile/rte_cycles.h b/lib/librte_eal/common/include/arch/tile/rte_cycles.h
index 0b2200a3ea75..a87b2f84a21e 100644
--- a/lib/librte_eal/common/include/arch/tile/rte_cycles.h
+++ b/lib/librte_eal/common/include/arch/tile/rte_cycles.h
@@ -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
-- 
2.7.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help