From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chao Zhu" Subject: Re: [PATCH] eal/ppc: fix rte_smp_mb for a compilation error with else clause Date: Wed, 28 Feb 2018 17:56:13 +0800 Message-ID: <000001d3b07a$5f911a40$1eb34ec0$@linux.vnet.ibm.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Cc: , To: "'Gowrishankar'" , Return-path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 349DB9E3 for ; Wed, 28 Feb 2018 10:56:21 +0100 (CET) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1S9smTS061777 for ; Wed, 28 Feb 2018 04:56:20 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gdrxtue2u-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 28 Feb 2018 04:56:20 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 28 Feb 2018 09:56:18 -0000 In-Reply-To: Content-Language: zh-cn List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Gowrishankar [mailto:gowrishankar.m@linux.vnet.ibm.com] > Sent: 2018=C4=EA2=D4=C227=C8=D5 23:14 > To: dev@dpdk.org > Cc: Chao Zhu ; stable@dpdk.org; > thomas@monjalon.net; Gowrishankar Muthukrishnan > > Subject: [PATCH] eal/ppc: fix rte_smp_mb for a compilation error with = else > clause >=20 > From: Gowrishankar Muthukrishnan >=20 > This patch fixes the compilation problem with rte_smp_mb, when there = is else > clause following it, as in test_barrier.c. >=20 > Fixes: 05c3fd7110 ("eal/ppc: atomic operations for IBM Power") > Cc: stable@dpdk.org >=20 > Signed-off-by: Gowrishankar Muthukrishnan > > --- > lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > index 39fce7b..1821774 100644 > --- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h > @@ -55,7 +55,7 @@ > * Guarantees that the LOAD and STORE operations generated before the > * barrier occur before the LOAD and STORE operations generated = after. > */ > -#define rte_mb() {asm volatile("sync" : : : "memory"); } > +#define rte_mb() asm volatile("sync" : : : "memory") >=20 > /** > * Write memory barrier. > -- > 1.9.1 Acked-by: Chao Zhu