From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Zhu Subject: [PATCH v3 09/14] Remove iopl operation for IBM Power architecture Date: Sun, 23 Nov 2014 20:22:17 -0500 Message-ID: <1416792142-23132-10-git-send-email-chaozhu@linux.vnet.ibm.com> References: <1416792142-23132-1-git-send-email-chaozhu@linux.vnet.ibm.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1416792142-23132-1-git-send-email-chaozhu-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.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(). */ -- 1.7.1