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 <chaozhu@linux.vnet.ibm.com>
Acked-by: David Marchand <david.marchand@6wind.com>
This commit is contained in:
Chao Zhu 2014-11-25 17:17:12 -05:00 committed by Thomas Monjalon
parent 9ae1553856
commit f0fa947c61

View File

@ -50,7 +50,9 @@
#include <errno.h>
#include <sys/mman.h>
#include <sys/queue.h>
#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686)
#include <sys/io.h>
#endif
#include <rte_common.h>
#include <rte_debug.h>
@ -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(). */