DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal/arm64: remove internal macros
@ 2020-03-09  9:38 David Marchand
  2020-03-09 13:22 ` Gavin Hu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Marchand @ 2020-03-09  9:38 UTC (permalink / raw)
  To: dev; +Cc: Jerin Jacob, Gavin Hu, Jan Viktorin

No need to export dsb and dmb.
EAL memory barriers are the public API.

%s/\<\(d.b\)\>(\([^()]*\))$/asm volatile("\1 \2" : : : "memory")/

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .../common/include/arch/arm/rte_atomic_64.h   | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 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 859ae129d8..7b7099cdc1 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
@@ -19,20 +19,17 @@ extern "C" {
 #include <rte_compat.h>
 #include <rte_debug.h>
 
-#define dsb(opt) asm volatile("dsb " #opt : : : "memory")
-#define dmb(opt) asm volatile("dmb " #opt : : : "memory")
+#define rte_mb() asm volatile("dsb sy" : : : "memory")
 
-#define rte_mb() dsb(sy)
+#define rte_wmb() asm volatile("dsb st" : : : "memory")
 
-#define rte_wmb() dsb(st)
+#define rte_rmb() asm volatile("dsb ld" : : : "memory")
 
-#define rte_rmb() dsb(ld)
+#define rte_smp_mb() asm volatile("dmb ish" : : : "memory")
 
-#define rte_smp_mb() dmb(ish)
+#define rte_smp_wmb() asm volatile("dmb ishst" : : : "memory")
 
-#define rte_smp_wmb() dmb(ishst)
-
-#define rte_smp_rmb() dmb(ishld)
+#define rte_smp_rmb() asm volatile("dmb ishld" : : : "memory")
 
 #define rte_io_mb() rte_mb()
 
@@ -40,9 +37,9 @@ extern "C" {
 
 #define rte_io_rmb() rte_rmb()
 
-#define rte_cio_wmb() dmb(oshst)
+#define rte_cio_wmb() asm volatile("dmb oshst" : : : "memory")
 
-#define rte_cio_rmb() dmb(oshld)
+#define rte_cio_rmb() asm volatile("dmb oshld" : : : "memory")
 
 /*------------------------ 128 bit atomic operations -------------------------*/
 
-- 
2.23.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal/arm64: remove internal macros
  2020-03-09  9:38 [dpdk-dev] [PATCH] eal/arm64: remove internal macros David Marchand
@ 2020-03-09 13:22 ` Gavin Hu
  2020-03-09 16:17 ` Jerin Jacob
  2020-03-13  9:47 ` David Marchand
  2 siblings, 0 replies; 4+ messages in thread
From: Gavin Hu @ 2020-03-09 13:22 UTC (permalink / raw)
  To: David Marchand, dev; +Cc: jerinj, Jan Viktorin, nd

Reviewed-by: Gavin Hu <gavin.hu@arm.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal/arm64: remove internal macros
  2020-03-09  9:38 [dpdk-dev] [PATCH] eal/arm64: remove internal macros David Marchand
  2020-03-09 13:22 ` Gavin Hu
@ 2020-03-09 16:17 ` Jerin Jacob
  2020-03-13  9:47 ` David Marchand
  2 siblings, 0 replies; 4+ messages in thread
From: Jerin Jacob @ 2020-03-09 16:17 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk-dev, Jerin Jacob, Gavin Hu, Jan Viktorin

On Mon, Mar 9, 2020 at 3:09 PM David Marchand <david.marchand@redhat.com> wrote:
>
> No need to export dsb and dmb.
> EAL memory barriers are the public API.
>
> %s/\<\(d.b\)\>(\([^()]*\))$/asm volatile("\1 \2" : : : "memory")/
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>


> ---
>  .../common/include/arch/arm/rte_atomic_64.h   | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 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 859ae129d8..7b7099cdc1 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
> @@ -19,20 +19,17 @@ extern "C" {
>  #include <rte_compat.h>
>  #include <rte_debug.h>
>
> -#define dsb(opt) asm volatile("dsb " #opt : : : "memory")
> -#define dmb(opt) asm volatile("dmb " #opt : : : "memory")
> +#define rte_mb() asm volatile("dsb sy" : : : "memory")
>
> -#define rte_mb() dsb(sy)
> +#define rte_wmb() asm volatile("dsb st" : : : "memory")
>
> -#define rte_wmb() dsb(st)
> +#define rte_rmb() asm volatile("dsb ld" : : : "memory")
>
> -#define rte_rmb() dsb(ld)
> +#define rte_smp_mb() asm volatile("dmb ish" : : : "memory")
>
> -#define rte_smp_mb() dmb(ish)
> +#define rte_smp_wmb() asm volatile("dmb ishst" : : : "memory")
>
> -#define rte_smp_wmb() dmb(ishst)
> -
> -#define rte_smp_rmb() dmb(ishld)
> +#define rte_smp_rmb() asm volatile("dmb ishld" : : : "memory")
>
>  #define rte_io_mb() rte_mb()
>
> @@ -40,9 +37,9 @@ extern "C" {
>
>  #define rte_io_rmb() rte_rmb()
>
> -#define rte_cio_wmb() dmb(oshst)
> +#define rte_cio_wmb() asm volatile("dmb oshst" : : : "memory")
>
> -#define rte_cio_rmb() dmb(oshld)
> +#define rte_cio_rmb() asm volatile("dmb oshld" : : : "memory")
>
>  /*------------------------ 128 bit atomic operations -------------------------*/
>
> --
> 2.23.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal/arm64: remove internal macros
  2020-03-09  9:38 [dpdk-dev] [PATCH] eal/arm64: remove internal macros David Marchand
  2020-03-09 13:22 ` Gavin Hu
  2020-03-09 16:17 ` Jerin Jacob
@ 2020-03-13  9:47 ` David Marchand
  2 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-03-13  9:47 UTC (permalink / raw)
  To: dev; +Cc: Jerin Jacob, Gavin Hu, Jan Viktorin

On Mon, Mar 9, 2020 at 10:39 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> No need to export dsb and dmb.
> EAL memory barriers are the public API.
>
> %s/\<\(d.b\)\>(\([^()]*\))$/asm volatile("\1 \2" : : : "memory")/
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>


Applied.

-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-13  9:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09  9:38 [dpdk-dev] [PATCH] eal/arm64: remove internal macros David Marchand
2020-03-09 13:22 ` Gavin Hu
2020-03-09 16:17 ` Jerin Jacob
2020-03-13  9:47 ` David Marchand

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).