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 62FCE5A4F for ; Fri, 30 Oct 2015 13:48:24 +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 3nnNjN1FsFzgB; Fri, 30 Oct 2015 13:48:24 +0100 (CET) Date: Fri, 30 Oct 2015 13:46:40 +0100 From: Jan Viktorin To: David Hunt Message-ID: <20151030134640.70e9b57d@pcviktorin.fit.vutbr.cz> In-Reply-To: <1446205886-23823-5-git-send-email-david.hunt@intel.com> References: <1446205886-23823-1-git-send-email-david.hunt@intel.com> <1446205886-23823-5-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 Subject: Re: [dpdk-dev] [PATCH v2 4/6] eal/arm: fix 64-bit armv8 compilation of 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: Fri, 30 Oct 2015 12:48:24 -0000 Much better then the previous... Reviewed-by: Jan Viktorin On Fri, 30 Oct 2015 11:51:24 +0000 David Hunt wrote: > Signed-off-by: David Hunt > --- > lib/librte_eal/common/include/arch/arm/rte_cpuflags.h | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/arch/arm/rte_cpuflags.h b/lib/librte_eal/common/include/arch/arm/rte_cpuflags.h > index 7ce9d14..5c5fd6a 100644 > --- a/lib/librte_eal/common/include/arch/arm/rte_cpuflags.h > +++ b/lib/librte_eal/common/include/arch/arm/rte_cpuflags.h > @@ -141,12 +141,16 @@ rte_cpu_get_features(__attribute__((unused)) uint32_t leaf, > __attribute__((unused)) uint32_t subleaf, cpuid_registers_t out) > { > int auxv_fd; > +#ifdef RTE_ARCH_64 > + Elf64_auxv_t auxv; > +#else > Elf32_auxv_t auxv; > +#endif > > auxv_fd = open("/proc/self/auxv", O_RDONLY); > assert(auxv_fd); > while (read(auxv_fd, &auxv, > - sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) { > + sizeof(auxv)) == sizeof(auxv)) { > if (auxv.a_type == AT_HWCAP) > out[REG_HWCAP] = auxv.a_un.a_val; > else if (auxv.a_type == AT_HWCAP2) -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic