From: Chris Metcalf <cmetcalf@mellanox.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>,
Vincent JARDIN <vincent.jardin@6wind.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Jerin Jacob <jerin.jacob@caviumnetworks.com>,
Liming Sun <lsun@mellanox.com>, Olga Shern <olgas@mellanox.com>,
Yael Shenhav <yaeli@mellanox.com>,
dev@dpdk.org
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Subject: [dpdk-dev] [PATCH 1/4] tile: avoid use of non-upstreamed <arch/cycle.h>
Date: Fri, 17 Feb 2017 20:52:26 -0500 [thread overview]
Message-ID: <1487382749-9887-2-git-send-email-cmetcalf@mellanox.com> (raw)
In-Reply-To: <1487382749-9887-1-git-send-email-cmetcalf@mellanox.com>
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 | 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
next prev parent reply other threads:[~2017-02-18 1:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-18 1:52 [dpdk-dev] [PATCH 0/4] catch up TILE-Gx support in DPDK Chris Metcalf
2017-02-18 1:52 ` Chris Metcalf [this message]
2017-02-18 1:52 ` [dpdk-dev] [PATCH 2/4] tile: remove requirement for <arch/mpipe_{xaui, gbe}_def.h headers Chris Metcalf
2017-02-18 1:52 ` [dpdk-dev] [PATCH 3/4] strict alignment: generalize warning handling Chris Metcalf
2017-02-18 1:52 ` [dpdk-dev] [PATCH 4/4] tile: fix remaining build issues Chris Metcalf
2017-02-18 9:29 ` [dpdk-dev] [PATCH 0/4] catch up TILE-Gx support in DPDK Thomas Monjalon
2017-02-20 20:24 ` Olga Shern
2017-02-21 9:14 ` Bruce Richardson
2017-02-21 15:54 ` Liming Sun
2017-02-21 18:15 ` Chris Metcalf
2017-02-27 15:36 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487382749-9887-2-git-send-email-cmetcalf@mellanox.com \
--to=cmetcalf@mellanox.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=lsun@mellanox.com \
--cc=olgas@mellanox.com \
--cc=thomas.monjalon@6wind.com \
--cc=vincent.jardin@6wind.com \
--cc=yaeli@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).