From patchwork Tue Nov 25 14:43:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Zhu X-Patchwork-Id: 1516 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 ECA488009; Tue, 25 Nov 2014 03:32:53 +0100 (CET) Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by dpdk.org (Postfix) with ESMTP id 551467F44 for ; Tue, 25 Nov 2014 03:32:46 +0100 (CET) Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Nov 2014 12:43:35 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 25 Nov 2014 12:43:32 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id D9A8B3578075 for ; Tue, 25 Nov 2014 13:43:31 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAP2hN1f32440326 for ; Tue, 25 Nov 2014 13:43:31 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAP2gxY2026949 for ; Tue, 25 Nov 2014 13:42:59 +1100 Received: from os_controller.crl.ibm.com ([9.186.57.97]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAP2gnrv026184 for ; Tue, 25 Nov 2014 13:42:58 +1100 From: Chao Zhu To: dev@dpdk.org Date: Tue, 25 Nov 2014 09:43:41 -0500 Message-Id: <1416926626-7942-10-git-send-email-chaozhu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1416926626-7942-1-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1416926626-7942-1-git-send-email-chaozhu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14112502-0029-0000-0000-000000AAD6C6 Subject: [dpdk-dev] [PATCH v4 09/14] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" iopl() call is mostly for the i386 architecture. In Power and other architecture, it doesn't exist. This patch modified rte_eal_iopl_init() and make it return -1 for Power and other architecture. Thus rte_config.flags will not contain EAL_FLG_HIGH_IOPL flag for other architecture. Signed-off-by: Chao Zhu --- lib/librte_eal/linuxapp/eal/eal.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 7a1d087..8c0223f 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -50,7 +50,9 @@ #include #include #include +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) #include +#endif #include #include @@ -752,13 +754,19 @@ rte_eal_mcfg_complete(void) /* * Request iopl privilege for all RPL, returns 0 on success + * iopl() call is mostly for the i386 architecture. For other architectures, + * return -1 to indicate IO priviledge can't be changed in this way. */ int rte_eal_iopl_init(void) { +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) if (iopl(3) != 0) return -1; return 0; +#else + return -1; +#endif } /* Launch threads, called at application init(). */