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 <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
This commit is contained in:
Feifei Wang 2021-10-20 11:03:34 +08:00 committed by David Marchand
parent 69a3c63191
commit a6e24bf417

View 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