From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3nl1j46j2Qz4qf; Mon, 26 Oct 2015 17:24:56 +0100 (CET) Date: Mon, 26 Oct 2015 17:23:10 +0100 From: Jan Viktorin To: David Hunt Message-ID: <20151026172310.138bfebb@pcviktorin.fit.vutbr.cz> In-Reply-To: <1445609833-17649-4-git-send-email-david.hunt@intel.com> References: <1445609833-17649-1-git-send-email-david.hunt@intel.com> <1445609833-17649-4-git-send-email-david.hunt@intel.com> Organization: RehiveTech MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Benjamin Boren Subject: Re: [dpdk-dev] [PATCH 03/11] lib: add armv8 rte_cpuflags.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 16:24:57 -0000 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