From: David Marchand Date: Mon, 9 Mar 2020 09:38:44 +0000 (+0100) Subject: eal/arm64: remove internal macros X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d635f81c56626a071faac3b8a97a33f12dd70c17;p=dpdk.git eal/arm64: remove internal macros 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 Reviewed-by: Gavin Hu Acked-by: Jerin Jacob --- 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 #include -#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 -------------------------*/