From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v1 0/5] clean-up cpuflags Date: Wed, 3 Feb 2016 19:08:12 +0530 Message-ID: <20160203133810.GA7359@localhost.localdomain> References: <1454453993-3903-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, viktorin@rehivetech.com To: Thomas Monjalon Return-path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0100.outbound.protection.outlook.com [207.46.100.100]) by dpdk.org (Postfix) with ESMTP id 3CBD556A9 for ; Wed, 3 Feb 2016 14:38:36 +0100 (CET) Content-Disposition: inline In-Reply-To: <1454453993-3903-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Feb 02, 2016 at 11:59:48PM +0100, Thomas Monjalon wrote: > Following the work of Ferruh, I suggest this cleanup to remove as much > as possible of the code from the cpuflags headers. > The goal is to un-inline these functions (not performance sensitive) > and remove the CPU flags table from the ABI (just added recently). > The bonus is to stop mimic x86 in ARM and PPC implementations. >=20 > WARNING: it has not been tested nor compiled on Tilera, ARM and POWER8. > Please help, thank you. compilation errors on arm64 too. arm64 toolchains are publicly available @ http://releases.linaro.org/14.11/components/toolchain/binaries/aarch64-li= nux-gnu/ =E2=9E=9C [master] thunderx [dpdk-master] $ make =3D=3D Build lib =3D=3D Build lib/librte_compat =3D=3D Build lib/librte_eal =3D=3D Build lib/librte_eal/common =3D=3D Build lib/librte_eal/linuxapp =3D=3D Build lib/librte_eal/linuxapp/igb_uio (cat /dev/null; echo kernel//home/jerin/dpdk-master/build/build/lib/librte_eal/linuxapp/igb_ui= o/igb_uio.ko;) > /home/jerin/dpdk-master/build/build/lib/librte_eal/linuxapp/igb_uio/mod= ules.order Building modules, stage 2. MODPOST 1 modules =3D=3D Build lib/librte_eal/linuxapp/eal CC rte_cpuflags.o /home/jerin/dpdk-master/lib/librte_eal/common/arch/arm/rte_cpuflags.c:83:= 20: error: =E2=80=98REG_PLATFORM=E2=80=99 undeclared here (not in a function) FEAT_DEF(AARCH64, REG_PLATFORM, 1) ^ /home/jerin/dpdk-master/lib/librte_eal/common/arch/arm/rte_cpuflags.c:71:= 26: note: in definition of macro =E2=80=98FEAT_DEF=E2=80=99 [RTE_CPUFLAG_##name] =3D {reg, bit, #name}, ^ /home/jerin/dpdk-master/lib/librte_eal/common/arch/arm/rte_cpuflags.c: In function =E2=80=98rte_cpu_get_features=E2=80=99: /home/jerin/dpdk-master/lib/librte_eal/common/arch/arm/rte_cpuflags.c:144= :8: error: array subscript is not an integer out[REG_PLATFORM] =3D 0x0001; ^ /home/jerin/dpdk-master/lib/librte_eal/common/arch/arm/rte_cpuflags.c:144= :5: error: statement with no effect [-Werror=3Dunused-value] out[REG_PLATFORM] =3D 0x0001; ^ cc1: all warnings being treated as errors /home/jerin/dpdk-master/mk/internal/rte.compile-pre.mk:126: recipe for target 'rte_cpuflags.o' failed make[5]: *** [rte_cpuflags.o] Error 1 /home/jerin/dpdk-master/mk/rte.subdir.mk:61: recipe for target 'eal' failed make[4]: *** [eal] Error 2 /home/jerin/dpdk-master/mk/rte.subdir.mk:61: recipe for target 'linuxapp' failed make[3]: *** [linuxapp] Error 2 /home/jerin/dpdk-master/mk/rte.subdir.mk:61: recipe for target 'librte_eal' failed make[2]: *** [librte_eal] Error 2 /home/jerin/dpdk-master/mk/rte.sdkbuild.mk:77: recipe for target 'lib' failed make[1]: *** [lib] Error 2 /home/jerin/dpdk-master/mk/rte.sdkroot.mk:123: recipe for target 'all' failed make: *** [all] Error 2 >=20 > Thomas Monjalon (5): > eal: get CPU flag name > eal: move CPU flag functions out of headers > eal/arm: adapt CPU flags check to the arch > eal/ppc: adapt CPU flags check to the arch > eal: remove compiler optimization workaround >=20 > app/test/test_hash_scaling.c | 2 + > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 2 +- > lib/librte_eal/common/arch/arm/rte_cpuflags.c | 170 +++++++++++++= +++----- > lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c | 145 +++++++++++++= ----- > lib/librte_eal/common/arch/tile/rte_cpuflags.c | 11 ++ > lib/librte_eal/common/arch/x86/rte_cpuflags.c | 91 +++++++++++ > lib/librte_eal/common/eal_common_cpuflags.c | 18 +-- > .../common/include/arch/arm/rte_cpuflags_32.h | 78 ---------- > .../common/include/arch/arm/rte_cpuflags_64.h | 79 ---------- > .../common/include/arch/ppc_64/rte_cpuflags.h | 64 -------- > .../common/include/arch/tile/rte_cpuflags.h | 29 ---- > .../common/include/arch/x86/rte_cpuflags.h | 66 -------- > .../common/include/generic/rte_cpuflags.h | 56 ++----- > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 3 +- > 14 files changed, 364 insertions(+), 450 deletions(-) >=20 > --=20 > 2.5.2 >=20