From a6e24bf41787766861a5fe6c8ae7a22954b0bf61 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Wed, 20 Oct 2021 11:03:34 +0800 Subject: [PATCH] mem: use WFE for init sync on aarch64 Instead of polling for mcfg->magic to be updated, use wait_until_equal API. Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang --- lib/eal/common/eal_common_mcfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_mcfg.c b/lib/eal/common/eal_common_mcfg.c index c77ba97a9f..cf4a279905 100644 --- a/lib/eal/common/eal_common_mcfg.c +++ b/lib/eal/common/eal_common_mcfg.c @@ -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 -- 2.20.1