From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F8A3A09E4; Thu, 22 Apr 2021 14:49:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF87141D6E; Thu, 22 Apr 2021 14:49:25 +0200 (CEST) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 937F341D66 for ; Thu, 22 Apr 2021 14:49:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 27E23C5F65; Thu, 22 Apr 2021 14:49:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WkDgIWQetnRB; Thu, 22 Apr 2021 14:49:19 +0200 (CEST) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id 21123C5F6A; Thu, 22 Apr 2021 14:49:15 +0200 (CEST) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, aconole@redhat.com, maicolgabriel@hotmail.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, jerinj@marvell.com, viktorin@rehivetech.com, ajit.khaparde@broadcom.com Cc: juraj.linkes@pantheon.tech, dev@dpdk.org Date: Thu, 22 Apr 2021 14:49:05 +0200 Message-Id: <1619095749-7948-5-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618995020-4775-1-git-send-email-juraj.linkes@pantheon.tech> <1619095749-7948-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v17 4/8] eal/arm: update CPU flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There are two execution states on armv8 architecture, aarch64 and aarch32. Add PLATFORM_STR for the latter and update RTE_ARCH_* flags according to e9b97392640. Signed-off-by: Juraj Linkeš --- lib/eal/arm/include/rte_cpuflags_32.h | 1 + lib/eal/arm/rte_cpuflags.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/eal/arm/include/rte_cpuflags_32.h b/lib/eal/arm/include/rte_cpuflags_32.h index b5347be1ec..4e254428a2 100644 --- a/lib/eal/arm/include/rte_cpuflags_32.h +++ b/lib/eal/arm/include/rte_cpuflags_32.h @@ -41,6 +41,7 @@ enum rte_cpu_flag_t { RTE_CPUFLAG_SHA2, RTE_CPUFLAG_CRC32, RTE_CPUFLAG_V7L, + RTE_CPUFLAG_V8L, /* The last item */ RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */ }; diff --git a/lib/eal/arm/rte_cpuflags.c b/lib/eal/arm/rte_cpuflags.c index e3a53bcece..9e5b68b066 100644 --- a/lib/eal/arm/rte_cpuflags.c +++ b/lib/eal/arm/rte_cpuflags.c @@ -46,8 +46,12 @@ struct feature_entry { #define FEAT_DEF(name, reg, bit) \ [RTE_CPUFLAG_##name] = {reg, bit, #name}, +#ifdef RTE_ARCH_32 #ifdef RTE_ARCH_ARMv7 #define PLATFORM_STR "v7l" +#elif defined RTE_ARCH_ARMv8_AARCH32 +#define PLATFORM_STR "v8l" +#endif typedef Elf32_auxv_t _Elfx_auxv_t; const struct feature_entry rte_cpu_feature_table[] = { @@ -78,10 +82,14 @@ const struct feature_entry rte_cpu_feature_table[] = { FEAT_DEF(SHA1, REG_HWCAP2, 2) FEAT_DEF(SHA2, REG_HWCAP2, 3) FEAT_DEF(CRC32, REG_HWCAP2, 4) + #ifdef RTE_ARCH_ARMv7 FEAT_DEF(V7L, REG_PLATFORM, 0) + #elif defined RTE_ARCH_ARMv8_AARCH32 + FEAT_DEF(V8L, REG_PLATFORM, 0) + #endif }; -#elif defined RTE_ARCH_ARM64 +#elif defined RTE_ARCH_64 #define PLATFORM_STR "aarch64" typedef Elf64_auxv_t _Elfx_auxv_t; -- 2.20.1