common/octeontx2: fix memory mapping API usage
[dpdk.git] / lib / librte_eal / common / rte_random.c
index 57ec8fb..b2c5416 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright(c) 2019 Ericsson AB
  */
 
-#ifdef RTE_MACHINE_CPUFLAG_RDSEED
+#ifdef __RDSEED__
 #include <x86intrin.h>
 #endif
 #include <stdlib.h>
@@ -188,7 +188,7 @@ __rte_random_initial_seed(void)
        if (ge_rc == 0)
                return ge_seed;
 #endif
-#ifdef RTE_MACHINE_CPUFLAG_RDSEED
+#ifdef __RDSEED__
        unsigned int rdseed_low;
        unsigned int rdseed_high;
 
@@ -198,7 +198,7 @@ __rte_random_initial_seed(void)
                return (uint64_t)rdseed_low | ((uint64_t)rdseed_high << 32);
 #endif
        /* second fallback: seed using rdtsc */
-       return rte_get_timer_cycles();
+       return rte_get_tsc_cycles();
 }
 
 RTE_INIT(rte_rand_init)