From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp05.in.ibm.com (e28smtp05.in.ibm.com [122.248.162.5]) by dpdk.org (Postfix) with ESMTP id EB2B6C40A for ; Mon, 3 Aug 2015 09:14:31 +0200 (CEST) Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Aug 2015 12:44:30 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp05.in.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 3 Aug 2015 12:44:27 +0530 X-Helo: d28dlp02.in.ibm.com X-MailFrom: chaozhu@linux.vnet.ibm.com X-RcptTo: dev@dpdk.org Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 73E303940067 for ; Mon, 3 Aug 2015 12:44:27 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t737EO6G27918520 for ; Mon, 3 Aug 2015 12:44:24 +0530 Received: from d28av05.in.ibm.com (localhost [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t737EN2t014688 for ; Mon, 3 Aug 2015 12:44:23 +0530 Received: from os_controller.crl.ibm.com ([9.186.57.26]) by d28av05.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t737ELE8014417 for ; Mon, 3 Aug 2015 12:44:22 +0530 From: Chao Zhu To: dev@dpdk.org Date: Mon, 3 Aug 2015 15:16:18 +0800 Message-Id: <1438586178-19555-2-git-send-email-chaozhu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1438586178-19555-1-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1438586178-19555-1-git-send-email-chaozhu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15080307-0017-0000-0000-0000067F1B83 Subject: [dpdk-dev] [PATCH] PPC64: add cpu cycle support to IBM POWER8 PPC64LE 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, 03 Aug 2015 07:14:32 -0000 On IBM POWER8 PPC64 little endian architecture, the definition of tsc union will be different. This patch fix this to enable the right output from rte_rdtsc(). Signed-off-by: Chao Zhu --- .../common/include/arch/ppc_64/rte_cycles.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h b/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h index fd26e8e..e663c48 100644 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h @@ -51,8 +51,13 @@ rte_rdtsc(void) union { uint64_t tsc_64; struct { +#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN uint32_t hi_32; uint32_t lo_32; +#else + uint32_t lo_32; + uint32_t hi_32; +#endif }; } tsc; uint32_t tmp; -- 1.7.1