From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH 6/6] eal: fix warning seen with armv8a clang Date: Thu, 11 May 2017 11:22:41 +0530 Message-ID: <20170511055239.GF3057@jerin> References: <20170510101643.30556-1-ashwin.sekhar@caviumnetworks.com> <20170510101643.30556-7-ashwin.sekhar@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: thomas@monjalon.net, maciej.czekaj@caviumnetworks.com, viktorin@rehivetech.com, jianbo.liu@linaro.org, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, konstantin.ananyev@intel.com, dev@dpdk.org To: Ashwin Sekhar T K Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0058.outbound.protection.outlook.com [104.47.40.58]) by dpdk.org (Postfix) with ESMTP id DB5F62952 for ; Thu, 11 May 2017 07:53:11 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20170510101643.30556-7-ashwin.sekhar@caviumnetworks.com> 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----- > Date: Wed, 10 May 2017 03:16:43 -0700 > From: Ashwin Sekhar T K > To: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, > maciej.czekaj@caviumnetworks.com, viktorin@rehivetech.com, > jianbo.liu@linaro.org, bruce.richardson@intel.com, > pablo.de.lara.guarch@intel.com, konstantin.ananyev@intel.com > Cc: dev@dpdk.org, Ashwin Sekhar T K > Subject: [dpdk-dev] [PATCH 6/6] eal: fix warning seen with armv8a clang > X-Mailer: git-send-email 2.13.0.rc1 > > Fixed warning -Wempty-body seen with armv8a clang compilation. > > Signed-off-by: Ashwin Sekhar T K > --- > lib/librte_eal/linuxapp/eal/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile > index 640afd088..dea1c1d59 100644 > --- a/lib/librte_eal/linuxapp/eal/Makefile > +++ b/lib/librte_eal/linuxapp/eal/Makefile > @@ -126,6 +126,10 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > CFLAGS_eal_thread.o += -Wno-return-type > endif > > +ifeq ($(CONFIG_RTE_ARCH_ARM64)$(CONFIG_RTE_TOOLCHAIN_CLANG),yy) > +CFLAGS_eal_common_launch.o += -Wno-empty-body > +endif clang pointed us an improvement here. You can add rte_pause() to reduce the power usage while waiting in rte_eal_wait_lcore(). That will remove the need for -Wno-empty-body for clang too. ➜ [master][dpdk-master] $ git diff diff --git a/lib/librte_eal/common/eal_common_launch.c b/lib/librte_eal/common/eal_common_launch.c index 229c3a0..1848466 100644 --- a/lib/librte_eal/common/eal_common_launch.c +++ b/lib/librte_eal/common/eal_common_launch.c @@ -54,7 +54,8 @@ rte_eal_wait_lcore(unsigned slave_id) return 0; while (lcore_config[slave_id].state != WAIT && - lcore_config[slave_id].state != FINISHED); + lcore_config[slave_id].state != FINISHED) + rte_pause(); > + > INC := rte_interrupts.h rte_kni_common.h rte_dom0_common.h > > SYMLINK-$(CONFIG_RTE_EXEC_ENV_LINUXAPP)-include/exec-env := \ > -- > 2.13.0.rc1 >