From patchwork Mon Nov 17 04:48:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Zhu X-Patchwork-Id: 1308 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 DBD6E800E; Sun, 16 Nov 2014 17:37:57 +0100 (CET) Received: from e28smtp06.in.ibm.com (e28smtp06.in.ibm.com [122.248.162.6]) by dpdk.org (Postfix) with ESMTP id 272717FAC for ; Sun, 16 Nov 2014 17:37:36 +0100 (CET) Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 16 Nov 2014 22:17:48 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 16 Nov 2014 22:17:45 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id DDB4FE0044 for ; Sun, 16 Nov 2014 22:17:58 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAGGnuiU4522472 for ; Sun, 16 Nov 2014 22:19:56 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAGGljRu031438 for ; Sun, 16 Nov 2014 22:17:45 +0530 Received: from os_controller.crl.ibm.com ([9.186.57.97]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAGGlP3A029091 for ; Sun, 16 Nov 2014 22:17:44 +0530 From: Chao Zhu To: dev@dpdk.org Date: Sun, 16 Nov 2014 23:48:22 -0500 Message-Id: <1416199705-24150-10-git-send-email-chaozhu@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1416199705-24150-1-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1416199705-24150-1-git-send-email-chaozhu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14111616-0021-0000-0000-0000023F01D4 Subject: [dpdk-dev] [PATCH v2 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: , 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(). */