From: "Chao Zhu" <chaozhu@linux.vnet.ibm.com>
To: "'Jerin Jacob'" <jerin.jacob@caviumnetworks.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>,
<gowrishankar.m@linux.vnet.ibm.com>, <ola.liljedahl@arm.com>
Subject: [dpdk-dev] 答复: [PATCH] eal/ppc64: add support for rte pause
Date: Fri, 12 Oct 2018 10:24:16 +0800 [thread overview]
Message-ID: <000001d461d2$adc87910$09596b30$@linux.vnet.ibm.com> (raw)
In-Reply-To: <20181007061857.29451-1-jerin.jacob@caviumnetworks.com>
-----邮件原件-----
发件人: Jerin Jacob <jerin.jacob@caviumnetworks.com>
发送时间: 2018年10月7日 14:19
收件人: Chao Zhu <chaozhu@linux.vnet.ibm.com>
抄送: dev@dpdk.org; thomas@monjalon.net; gowrishankar.m@linux.vnet.ibm.com;
ola.liljedahl@arm.com; Jerin Jacob <jerin.jacob@caviumnetworks.com>
主题: [dpdk-dev] [PATCH] eal/ppc64: add support for rte pause
Add support for rte_pause() implementation for ppc64.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
The reference implementation for Linux's cpu_relax() for ppc64 is at
https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/proc
essor.h#L440
---
lib/librte_eal/common/include/arch/ppc_64/rte_pause.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
index 8bd835764..16e47ce22 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h
@@ -9,10 +9,17 @@
extern "C" {
#endif
+#include "rte_atomic.h"
+
#include "generic/rte_pause.h"
static inline void rte_pause(void)
{
+ /* Set hardware multi-threading low priority */
+ asm volatile("or 1,1,1");
+ /* Set hardware multi-threading medium priority */
+ asm volatile("or 2,2,2");
+ rte_compiler_barrier();
}
#ifdef __cplusplus
--
2.19.0
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
next prev parent reply other threads:[~2018-10-12 2:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-07 6:18 [dpdk-dev] " Jerin Jacob
2018-10-12 2:24 ` Chao Zhu [this message]
2018-10-12 4:12 ` [dpdk-dev] 答复: " Jerin Jacob
2018-10-12 6:50 ` Thomas Monjalon
2018-10-26 12:40 ` Thomas Monjalon
2018-10-26 12:41 ` [dpdk-dev] " 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='000001d461d2$adc87910$09596b30$@linux.vnet.ibm.com' \
--to=chaozhu@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
--cc=gowrishankar.m@linux.vnet.ibm.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=ola.liljedahl@arm.com \
--cc=thomas@monjalon.net \
/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).