From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chao Zhu" Subject: Re: [PATCH 2/5] eal/ppc64: define architecture specific rdtsc hz Date: Thu, 28 Sep 2017 09:53:40 +0800 Message-ID: <000501d337fc$9d134b50$d739e1f0$@linux.vnet.ibm.com> References: <20170813070350.13700-1-jerin.jacob@caviumnetworks.com> <20170813070350.13700-3-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Cc: , , , , To: "'Jerin Jacob'" , Return-path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 6C409F94 for ; Thu, 28 Sep 2017 03:53:50 +0200 (CEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8S1rY0h000694 for ; Wed, 27 Sep 2017 21:53:49 -0400 Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d8pbgbyec-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 27 Sep 2017 21:53:49 -0400 Received: from localhost by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Sep 2017 11:53:46 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8S1rgew41812152 for ; Thu, 28 Sep 2017 11:53:42 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v8S1rhAH026664 for ; Thu, 28 Sep 2017 11:53:43 +1000 In-Reply-To: <20170813070350.13700-3-jerin.jacob@caviumnetworks.com> Content-Language: zh-cn List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: 2017=C4=EA8=D4=C213=C8=D5 15:04 > To: dev@dpdk.org > Cc: thomas@monjalon.net; bruce.richardson@intel.com; > konstantin.ananyev@intel.com; viktorin@rehivetech.com; > jianbo.liu@linaro.org; chaozhu@linux.vnet.ibm.com; Jerin Jacob > > Subject: [dpdk-dev] [PATCH 2/5] eal/ppc64: define architecture = specific rdtsc hz >=20 > CC: Chao Zhu > Signed-off-by: Jerin Jacob > --- > lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h | 13 = +++++++++++++ > 1 file changed, 13 insertions(+) >=20 > 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 8fa6fc60b..20243fb29 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 > @@ -79,6 +79,19 @@ rte_rdtsc(void) > return tsc.tsc_64; > } >=20 > +/** > + * Get the number of rdtsc cycles in one second if the architecture supports. > + * > + * @return > + * The number of rdtsc cycles in one second. Return zero if the architecture > + * support is not available. > + */ > +static inline uint64_t > +rte_rdtsc_arch_hz(void) > +{ > + return 0; > +} > + > static inline uint64_t > rte_rdtsc_precise(void) > { > -- > 2.14.0 Acked-by: Chao Zhu