mem: use WFE for init sync on aarch64
authorFeifei Wang <feifei.wang2@arm.com>
Wed, 20 Oct 2021 03:03:34 +0000 (11:03 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 20 Oct 2021 06:22:18 +0000 (08:22 +0200)
Instead of polling for mcfg->magic to be updated, use wait_until_equal
API.

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
lib/eal/common/eal_common_mcfg.c

index c77ba97..cf4a279 100644 (file)
@@ -30,8 +30,7 @@ eal_mcfg_wait_complete(void)
        struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
 
        /* wait until shared mem_config finish initialising */
-       while (mcfg->magic != RTE_MAGIC)
-               rte_pause();
+       rte_wait_until_equal_32(&mcfg->magic, RTE_MAGIC, __ATOMIC_RELAXED);
 }
 
 int