DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dpdk-dev <dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>,
	Gavin Hu <gavin.hu@arm.com>,
	Jan Viktorin <viktorin@rehivetech.com>
Subject: Re: [dpdk-dev] [PATCH] eal/arm64: remove internal macros
Date: Mon, 9 Mar 2020 21:47:05 +0530	[thread overview]
Message-ID: <CALBAE1PbOqku654wbTOOz+tgw0Jh+WcoRvBbPxNQz-hAjmnSoQ@mail.gmail.com> (raw)
In-Reply-To: <20200309093844.30579-1-david.marchand@redhat.com>

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
>

  parent reply	other threads:[~2020-03-09 16:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09  9:38 David Marchand
2020-03-09 13:22 ` Gavin Hu
2020-03-09 16:17 ` Jerin Jacob [this message]
2020-03-13  9:47 ` David Marchand

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=CALBAE1PbOqku654wbTOOz+tgw0Jh+WcoRvBbPxNQz-hAjmnSoQ@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gavin.hu@arm.com \
    --cc=jerinj@marvell.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).