From: Jan Viktorin Subject: Re: [PATCH 03/11] lib: add armv8 rte_cpuflags.h Date: Mon, 26 Oct 2015 17:23:10 +0100 Message-ID: <20151026172310.138bfebb@pcviktorin.fit.vutbr.cz> References: <1445609833-17649-1-git-send-email-david.hunt@intel.com> <1445609833-17649-4-git-send-email-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Benjamin Boren To: David Hunt Return-path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 2712A8D8B for ; Mon, 26 Oct 2015 17:24:57 +0100 (CET) In-Reply-To: <1445609833-17649-4-git-send-email-david.hunt@intel.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 Fri, 23 Oct 2015 15:17:05 +0100 David Hunt wrote: > +#include "generic/rte_cpuflags.h" > + > +/* Symbolic values for the entries in the auxiliary table */ > +#define AT_HWCAP 16 > +#define AT_HWCAP2 26 > +#define AT_PLATFORM 15 > + > +/* software based registers */ > +enum cpu_register_t { > + REG_HWCAP = 0, > + AARCH_MODE, > +}; > + > +/** > + * Enumeration of all CPU features supported > + */ > +enum rte_cpu_flag_t { > + RTE_CPUFLAG_FP = 0, > + RTE_CPUFLAG_ASIMD, > + RTE_CPUFLAG_EVTSTRM, > + RTE_CPUFLAG_AARCH64, > + RTE_CPUFLAG_AARCH32, We detect ARCH32/64 on both ARMv7 and ARMv8. This is strange. > + /* The last item */ > + RTE_CPUFLAG_NUMFLAGS,/**< This should always be the last! */ > +}; > + > +static const struct feature_entry cpu_feature_table[] = { > + FEAT_DEF(FP, 0x00000001, 0, REG_HWCAP, 0) > + FEAT_DEF(ASIMD, 0x00000001, 0, REG_HWCAP, 1) > + FEAT_DEF(EVTSTRM, 0x00000001, 0, REG_HWCAP, 2) > + FEAT_DEF(AARCH64, 0x00000001, 0, AARCH_MODE, 3) > + FEAT_DEF(AARCH32, 0x00000001, 0, AARCH_MODE, 4) > +}; > + Is it possible to extend it in the same way as it is prepared for ARMv7 [1, 2]? [1] https://github.com/RehiveTech/dpdk/commit/bd5f0480b60282cfcd0ef43ddf8896bef8a23bbb [2] https://github.com/RehiveTech/dpdk/commit/e293c11770aefc1f58f0c0cca5efee02b21910ba Perhaps, can we merge this with ARMv7 one (in a single file)? Do the features overlap in a sane way? Jan -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic