From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by dpdk.org (Postfix) with ESMTP id 0A0494CE4 for ; Fri, 25 Mar 2016 09:09:24 +0100 (CET) Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 Mar 2016 18:09:22 +1000 Received: from d23dlp02.au.ibm.com (202.81.31.213) by e23smtp03.au.ibm.com (202.81.31.209) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 25 Mar 2016 18:09:21 +1000 X-IBM-Helo: d23dlp02.au.ibm.com X-IBM-MailFrom: chaozhu@linux.vnet.ibm.com X-IBM-RcptTo: dev@dpdk.org Received: from d23relay08.au.ibm.com (d23relay08.au.ibm.com [9.185.71.33]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id A2D8D2BB0059 for ; Fri, 25 Mar 2016 19:09:20 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2P89CDh131410 for ; Fri, 25 Mar 2016 19:09:20 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2P88lNo010024 for ; Fri, 25 Mar 2016 19:08:47 +1100 Received: from os_controller.crl.ibm.com ([9.186.57.26]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u2P88flu008988 for ; Fri, 25 Mar 2016 19:08:47 +1100 From: Chao Zhu To: dev@dpdk.org Date: Fri, 25 Mar 2016 16:11:53 +0800 Message-Id: <1458893513-22406-3-git-send-email-chaozhu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1458893513-22406-1-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1458893513-22406-1-git-send-email-chaozhu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16032508-0009-0000-0000-0000069A180B Subject: [dpdk-dev] [PATCH 2/2] Fix prefetch instruction on IBM POWER8 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, 25 Mar 2016 08:09:26 -0000 Current prefetch instruction (dcbt) implementation for IBM POWER8 has wrong Touch Hint(TH) parameter. The current setting of TH=1 indicates to load data from current cache line and an unlimited number of sequentially following cache lines. TTH=0 means to load data from current cache line. rte_prefetch0 function is defined to load one cache line, which means TH=0 is suited here. Signed-off-by: Chao Zhu --- .../common/include/arch/ppc_64/rte_prefetch.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h b/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h index bcc7185..9a1995e 100644 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_prefetch.h @@ -41,17 +41,17 @@ extern "C" { static inline void rte_prefetch0(const volatile void *p) { - asm volatile ("dcbt 0,%[p],1" : : [p] "r" (p)); + asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p)); } static inline void rte_prefetch1(const volatile void *p) { - asm volatile ("dcbt 0,%[p],1" : : [p] "r" (p)); + asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p)); } static inline void rte_prefetch2(const volatile void *p) { - asm volatile ("dcbt 0,%[p],1" : : [p] "r" (p)); + asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p)); } static inline void rte_prefetch_non_temporal(const volatile void *p) -- 1.7.1