From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f169.google.com (mail-yw0-f169.google.com [209.85.161.169]) by dpdk.org (Postfix) with ESMTP id 95CB3282 for ; Tue, 3 Jan 2017 08:55:46 +0100 (CET) Received: by mail-yw0-f169.google.com with SMTP id a10so282659696ywa.3 for ; Mon, 02 Jan 2017 23:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gRqyfJpcCXk9V4jNU0DiXJxkAp7LY0CMbLFAq4uCPd0=; b=KUFiUekLC02vN1wQAGKSAZgEhbJnGY8YXAPWpqG/FDTAqnXfCiWtA/M4redJceSYa7 s/xjM7hhykIAztlYlaGfwceYOPgo2Y7mMcld+I8NP2P0B0eJYsgcKKRBMfxvxAee8y3n Y9e5nILIxxoLdjMmnLDtKnOfxt8FVLmUVAOkU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gRqyfJpcCXk9V4jNU0DiXJxkAp7LY0CMbLFAq4uCPd0=; b=grdJU8jLOO2cjNCfwD3mXoWBEnCMcSKckJFLY4p6ErXmd9fEnJY2Qe1AczNPiWZSie 7OCFy0aElIxQcPA0ocgbg4CfZN4gxqjLgN/nbA8e1R2gmwgslgN/W2A5dixpKOCWucc0 Gml9vG43ArCr87SG9bfmnf7xUL1Sgy95mQ1RjQCdt+rH+TIjgvD49SdLPthUZBVbH0t3 ZcDRSNSOIPhCSyWdTILz+MLMQDQPXIG+KNufeWAo0mWOF5zf2VAn+laF/CsWeqTfBXY5 93pw+NdBhoyKuDbVTShTkA0NXigqM0r9v7IjmbyZC4QJ65ByY2PC9PL7DgUC4x+x3iEH bMNw== X-Gm-Message-State: AIkVDXLVqPdm5z8mJfWgdqRYGvhv/TsPPJAbrEuZJl5NWkQm1T/Fr2x1pXTzNEn6a2qcOuBSexotnQFcBLp1CrJC X-Received: by 10.129.101.5 with SMTP id z5mr54397447ywb.70.1483430146040; Mon, 02 Jan 2017 23:55:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.221.65 with HTTP; Mon, 2 Jan 2017 23:55:45 -0800 (PST) In-Reply-To: <1482832175-27199-15-git-send-email-jerin.jacob@caviumnetworks.com> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-15-git-send-email-jerin.jacob@caviumnetworks.com> From: Jianbo Liu Date: Tue, 3 Jan 2017 15:55:45 +0800 Message-ID: To: Jerin Jacob Cc: dev@dpdk.org, "Ananyev, Konstantin" , Thomas Monjalon , Bruce Richardson , Jan Viktorin , Santosh Shukla Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH v2 14/29] eal/arm64: change barrier definitions to macros X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 07:55:46 -0000 On 27 December 2016 at 17:49, Jerin Jacob wrote: > Change rte_?wb definitions to macros in order to use rte_*mb? > keep consistent with other barrier definitions in > the file. > > Suggested-by: Jianbo Liu > Signed-off-by: Jerin Jacob > --- > .../common/include/arch/arm/rte_atomic_64.h | 36 ++-------------------- > 1 file changed, 3 insertions(+), 33 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 ef0efc7..dc3a0f3 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 > @@ -46,41 +46,11 @@ extern "C" { > #define dsb(opt) { asm volatile("dsb " #opt : : : "memory"); } > #define dmb(opt) { asm volatile("dmb " #opt : : : "memory"); } > > -/** > - * General memory barrier. > - * > - * Guarantees that the LOAD and STORE operations generated before the > - * barrier occur before the LOAD and STORE operations generated after. > - * This function is architecture dependent. > - */ > -static inline void rte_mb(void) > -{ > - dsb(sy); > -} > +#define rte_mb() dsb(sy) > > -/** > - * Write memory barrier. > - * > - * Guarantees that the STORE operations generated before the barrier > - * occur before the STORE operations generated after. > - * This function is architecture dependent. > - */ > -static inline void rte_wmb(void) > -{ > - dsb(st); > -} > +#define rte_wmb() dsb(st) > > -/** > - * Read memory barrier. > - * > - * Guarantees that the LOAD operations generated before the barrier > - * occur before the LOAD operations generated after. > - * This function is architecture dependent. > - */ How about keep the comments for all these macros? > -static inline void rte_rmb(void) > -{ > - dsb(ld); > -} > +#define rte_rmb() dsb(ld) > > #define rte_smp_mb() dmb(ish) > > -- > 2.5.5 >