alarm: make cancellation thread-safe
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal.c
index 05804dc..7a1d087 100644 (file)
@@ -75,7 +75,6 @@
 #include <rte_atomic.h>
 #include <malloc_heap.h>
 #include <rte_eth_ring.h>
-#include <rte_dev.h>
 
 #include "eal_private.h"
 #include "eal_thread.h"
@@ -88,8 +87,6 @@
 
 #define SOCKET_MEM_STRLEN (RTE_MAX_NUMA_NODES * 10)
 
-#define HIGHEST_RPL 3
-
 /* Allow the application to print its usage message too if set */
 static rte_usage_hook_t        rte_application_usage_hook = NULL;
 
@@ -756,10 +753,12 @@ rte_eal_mcfg_complete(void)
 /*
  * Request iopl privilege for all RPL, returns 0 on success
  */
-static int
+int
 rte_eal_iopl_init(void)
 {
-       return iopl(HIGHEST_RPL);
+       if (iopl(3) != 0)
+               return -1;
+       return 0;
 }
 
 /* Launch threads, called at application init(). */
@@ -821,9 +820,6 @@ rte_eal_init(int argc, char **argv)
 
        rte_config_init();
 
-       if (rte_eal_iopl_init() == 0)
-               rte_config.flags |= EAL_FLG_HIGH_IOPL;
-
        if (rte_eal_pci_init() < 0)
                rte_panic("Cannot init PCI\n");
 
@@ -877,7 +873,7 @@ rte_eal_init(int argc, char **argv)
        RTE_LOG(DEBUG, EAL, "Master core %u is ready (tid=%x)\n",
                rte_config.master_lcore, (int)thread_id);
 
-       if (rte_eal_dev_init(PMD_INIT_PRE_PCI_PROBE) < 0)
+       if (rte_eal_dev_init() < 0)
                rte_panic("Cannot init pmd devices\n");
 
        RTE_LCORE_FOREACH_SLAVE(i) {
@@ -909,11 +905,7 @@ rte_eal_init(int argc, char **argv)
 
        /* Probe & Initialize PCI devices */
        if (rte_eal_pci_probe())
-                       rte_panic("Cannot probe PCI\n");
-
-       /* Initialize any outstanding devices */
-       if (rte_eal_dev_init(PMD_INIT_POST_PCI_PROBE) < 0)
-               rte_panic("Cannot init pmd devices\n");
+               rte_panic("Cannot probe PCI\n");
 
        return fctret;
 }