From patchwork Mon Nov 24 01:22:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Zhu X-Patchwork-Id: 1474 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 092808037; Sun, 23 Nov 2014 14:11:48 +0100 (CET) Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by dpdk.org (Postfix) with ESMTP id C86D27FC4 for ; Sun, 23 Nov 2014 14:11:35 +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 ; Sun, 23 Nov 2014 23:22:17 +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; Sun, 23 Nov 2014 23:22:16 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id D09C93578057 for ; Mon, 24 Nov 2014 00:22:15 +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 sANDM7oh33751070 for ; Mon, 24 Nov 2014 00:22:15 +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 sANDLhmk017434 for ; Mon, 24 Nov 2014 00:21:43 +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 sANDLYg0017172 for ; Mon, 24 Nov 2014 00:21:43 +1100 From: Chao Zhu To: dev@dpdk.org Date: Sun, 23 Nov 2014 20:22:17 -0500 Message-Id: <1416792142-23132-10-git-send-email-chaozhu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1416792142-23132-1-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1416792142-23132-1-git-send-email-chaozhu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14112313-0029-0000-0000-000000A742B3 Subject: [dpdk-dev] [PATCH v3 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..0bf81be 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(). */