From: Shreyansh Jain Date: Thu, 29 Aug 2019 10:27:33 +0000 (+0530) Subject: bus/fslmc: check for DMA map in primary process only X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4512386f2a27281777a6f5b87d6d852ae8c93153;p=dpdk.git bus/fslmc: check for DMA map in primary process only DMA mapping is a property of primary process - SMMU population done once by primary doesn't need to be populated again in secondary Signed-off-by: Shreyansh Jain Reviewed-by: Sachin Saxena --- diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 8c155ac688..e3f524844d 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -394,12 +394,15 @@ rte_fslmc_probe(void) /* Map existing segments as well as, in case of hotpluggable memory, * install callback handler. */ - ret = rte_fslmc_vfio_dmamap(); - if (ret) { - DPAA2_BUS_ERR("Unable to DMA map existing VAs: (%d)", ret); - /* Not continuing ahead */ - DPAA2_BUS_ERR("FSLMC VFIO Mapping failed"); - return 0; + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + ret = rte_fslmc_vfio_dmamap(); + if (ret) { + DPAA2_BUS_ERR("Unable to DMA map existing VAs: (%d)", + ret); + /* Not continuing ahead */ + DPAA2_BUS_ERR("FSLMC VFIO Mapping failed"); + return 0; + } } ret = fslmc_vfio_process_group();