-----Original Message----- > Date: Wed, 10 May 2017 03:16:43 -0700 > From: Ashwin Sekhar T K <ashwin.sek...@caviumnetworks.com> > To: tho...@monjalon.net, jerin.ja...@caviumnetworks.com, > maciej.cze...@caviumnetworks.com, vikto...@rehivetech.com, > jianbo....@linaro.org, bruce.richard...@intel.com, > pablo.de.lara.gua...@intel.com, konstantin.anan...@intel.com > Cc: dev@dpdk.org, Ashwin Sekhar T K <ashwin.sek...@caviumnetworks.com> > 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 <ashwin.sek...@caviumnetworks.com> > --- > 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 >