From: Chao Zhu Date: Tue, 25 Nov 2014 22:17:12 +0000 (-0500) Subject: eal/linux: disable iopl operation for IBM Power X-Git-Tag: spdx-start~10047 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f0fa947c61589c912970e023a273836f5d35f8ca;p=dpdk.git eal/linux: disable iopl operation for IBM Power 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 Acked-by: David Marchand --- diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 5e5a7a0f9c..68cae884a8 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 @@ -673,13 +675,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 privilege 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(). */