]> git.droids-corp.org - dpdk.git/commitdiff
eal/linux: only call iopl on x86
authorOlivier Matz <olivier.matz@6wind.com>
Tue, 17 May 2016 09:59:47 +0000 (11:59 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 15 Jun 2016 17:06:27 +0000 (19:06 +0200)
From iopl(2) man page: "This call is mostly for the x86 architecture. On
many other architectures it does not exist or will always return an
error".

This patch removes the call to iopl() in rte_eal_iopl_init() for
architectures other than x86, and always return 0 (success). This was
already done for ARM in
commit 0291476ae364 ("eal/linux: never check iopl for arm")

Next patches will introduce the support of memory mapped IO resources
for architectures != x86.

On BSD, there is nothing to do as open("/dev/io") already does the
proper thing. See man IO(4).

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_eal/linuxapp/eal/eal.c

index 8aafd519fdbea06fcbb4bffcbbda16cdc5504bfe..bba8fea5177848ca5dadc32bb264d8806b73ee05 100644 (file)
@@ -715,12 +715,8 @@ rte_eal_iopl_init(void)
 #if defined(RTE_ARCH_X86)
        if (iopl(3) != 0)
                return -1;
-       return 0;
-#elif defined(RTE_ARCH_ARM) || defined(RTE_ARCH_ARM64)
-       return 0; /* iopl syscall not supported for ARM/ARM64 */
-#else
-       return -1;
 #endif
+       return 0;
 }
 
 /* Launch threads, called at application init(). */