From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <konstantin.ananyev@intel.com>, <thomas.monjalon@6wind.com>,
<bruce.richardson@intel.com>, <jianbo.liu@linaro.org>,
<viktorin@rehivetech.com>, <santosh.shukla@caviumnetworks.com>,
Jerin Jacob <jerin.jacob@caviumnetworks.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [dpdk-dev] [PATCH v4 07/29] eal/arm64: fix memory barrier definition for arm64
Date: Tue, 17 Jan 2017 12:43:42 +0530 [thread overview]
Message-ID: <1484637244-7548-8-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1484637244-7548-1-git-send-email-jerin.jacob@caviumnetworks.com>
dsb instruction based barrier is used for non smp
version of memory barrier.
Fixes: d708f01b7102 ("eal/arm: add atomic operations for ARMv8")
CC: Jianbo Liu <jianbo.liu@linaro.org>
CC: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
---
lib/librte_eal/common/include/arch/arm/rte_atomic_64.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
index d854aac..bc7de64 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
@@ -43,7 +43,8 @@ extern "C" {
#include "generic/rte_atomic.h"
-#define dmb(opt) do { asm volatile("dmb " #opt : : : "memory"); } while (0)
+#define dsb(opt) { asm volatile("dsb " #opt : : : "memory"); }
+#define dmb(opt) { asm volatile("dmb " #opt : : : "memory"); }
/**
* General memory barrier.
@@ -54,7 +55,7 @@ extern "C" {
*/
static inline void rte_mb(void)
{
- dmb(ish);
+ dsb(sy);
}
/**
@@ -66,7 +67,7 @@ static inline void rte_mb(void)
*/
static inline void rte_wmb(void)
{
- dmb(ishst);
+ dsb(st);
}
/**
@@ -78,7 +79,7 @@ static inline void rte_wmb(void)
*/
static inline void rte_rmb(void)
{
- dmb(ishld);
+ dsb(ld);
}
#define rte_smp_mb() rte_mb()
--
2.5.5
next prev parent reply other threads:[~2017-01-17 7:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com>
2016-12-14 1:55 ` [dpdk-stable] [dpdk-dev] [PATCH 07/28] " Jerin Jacob
[not found] ` <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com>
2016-12-27 9:49 ` [dpdk-stable] [dpdk-dev] [PATCH v2 07/29] " Jerin Jacob
2017-01-03 7:40 ` Jianbo Liu
[not found] ` <1484212646-10338-1-git-send-email-jerin.jacob@caviumnetworks.com>
2017-01-12 9:17 ` [dpdk-stable] [dpdk-dev] [PATCH v3 " Jerin Jacob
[not found] ` <1484637244-7548-1-git-send-email-jerin.jacob@caviumnetworks.com>
2017-01-17 7:13 ` Jerin Jacob [this message]
[not found] ` <1484702502-25451-1-git-send-email-jerin.jacob@caviumnetworks.com>
2017-01-18 1:21 ` [dpdk-stable] [dpdk-dev] [PATCH v5 " Jerin Jacob
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=1484637244-7548-8-git-send-email-jerin.jacob@caviumnetworks.com \
--to=jerin.jacob@caviumnetworks.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jianbo.liu@linaro.org \
--cc=konstantin.ananyev@intel.com \
--cc=santosh.shukla@caviumnetworks.com \
--cc=stable@dpdk.org \
--cc=thomas.monjalon@6wind.com \
--cc=viktorin@rehivetech.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).