From patchwork Fri Oct 30 11:51:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunt, David" X-Patchwork-Id: 8366 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 1B7028E86; Fri, 30 Oct 2015 12:51:56 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 244548E71 for ; Fri, 30 Oct 2015 12:51:49 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 30 Oct 2015 04:51:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,218,1444719600"; d="scan'208";a="807421588" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 30 Oct 2015 04:51:47 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t9UBplcM024786; Fri, 30 Oct 2015 11:51:47 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t9UBplb7023906; Fri, 30 Oct 2015 11:51:47 GMT Received: (from dhunt5@localhost) by sivswdev02.ir.intel.com with id t9UBpl8S023902; Fri, 30 Oct 2015 11:51:47 GMT From: David Hunt To: dev@dpdk.org Date: Fri, 30 Oct 2015 11:51:24 +0000 Message-Id: <1446205886-23823-5-git-send-email-david.hunt@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1446205886-23823-1-git-send-email-david.hunt@intel.com> References: <1446205886-23823-1-git-send-email-david.hunt@intel.com> Subject: [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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: David Hunt Reviewed-by: Jan Viktorin --- 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)