From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1C011959 for ; Tue, 7 Oct 2014 16:40:13 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 07 Oct 2014 07:46:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,670,1406617200"; d="scan'208";a="610835968" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga002.fm.intel.com with ESMTP; 07 Oct 2014 07:46:35 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.174]) by IRSMSX104.ger.corp.intel.com ([169.254.5.248]) with mapi id 14.03.0195.001; Tue, 7 Oct 2014 15:46:19 +0100 From: "Ananyev, Konstantin" To: Cyril Chemparathy , Chao Zhu , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 09/12] Remove iopl operation for IBM Power architecture Thread-Index: AQHP4bCjzJ7rjxbrfE2l7UPtbIxGxZwkthcQ Date: Tue, 7 Oct 2014 14:46:18 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725821391202@IRSMSX105.ger.corp.intel.com> References: <1411724186-8036-1-git-send-email-bjzhuc@cn.ibm.com> <1411724186-8036-10-git-send-email-bjzhuc@cn.ibm.com> <543311C7.40906@tilera.com> In-Reply-To: <543311C7.40906@tilera.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 09/12] Remove iopl operation for IBM Power architecture 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: Tue, 07 Oct 2014 14:40:14 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Cyril Chemparathy > Sent: Monday, October 06, 2014 11:04 PM > To: Chao Zhu; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 09/12] Remove iopl operation for IBM Power= architecture >=20 > On 9/26/2014 2:36 AM, Chao Zhu wrote: > > iopl() call is mostly for the i386 architecture. In Power architecture. > > It doesn't exist. This patch modified rte_eal_iopl_init() and make it > > return -1 on Power. This means rte_config.flags will not contain > > EAL_FLG_HIGH_IOPL flag on IBM Power architecture. >=20 > Since iopl() is an x86-only thing, shouldn't the code be conditional on > defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) instead of below? >=20 > Better still, should we maybe break out an architecture specific init > function? This function could set iopl on x86, and possibly do other > lowlevel init things on other architectures... Yep, that sounds like a good way to me too.=20 >=20 > > Signed-off-by: Chao Zhu > > --- > > lib/librte_eal/linuxapp/eal/eal.c | 11 +++++++++++ > > 1 files changed, 11 insertions(+), 0 deletions(-) > > > > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxap= p/eal/eal.c > > index 4869e7c..8cc1f21 100644 > > --- a/lib/librte_eal/linuxapp/eal/eal.c > > +++ b/lib/librte_eal/linuxapp/eal/eal.c > > @@ -50,7 +50,10 @@ > > #include > > #include > > #include > > +/* Power architecture doesn't have this header file */ > > +#ifndef RTE_ARCH_PPC_64 > > #include > > +#endif > > > > #include > > #include > > @@ -1019,11 +1022,19 @@ rte_eal_mcfg_complete(void) > > > > /* > > * Request iopl privilege for all RPL, returns 0 on success > > + * > > + * Power architecture doesn't have iopl function, so this function > > + * return -1 on Power architecture, because this function is only used > > + * in rte_eal_init to add EAL_FLG_HIGH_IOPL to rte_config.flags. > > */ > > static int > > rte_eal_iopl_init(void) > > { > > +#ifndef RTE_ARCH_PPC_64 > > return iopl(HIGHEST_RPL); > > +#else > > + return -1; > > +#endif > > } > > > > /* Launch threads, called at application init(). */