From: Shreyansh Jain Date: Thu, 29 Aug 2019 10:27:32 +0000 (+0530) Subject: bus/fslmc: restrict address translation to PA mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=297e5df593360f948342a9b71deb7910f717e21b;p=dpdk.git bus/fslmc: restrict address translation to PA mode The address translation support for PA->VA is required only in case of PA mode operation of DPDK. This was causing warning to be reported on running any DPAA2 application in VA mode: Add: Incorrect entry for PA->VA Table(xxxxxxxxxx) Add: Lowest address: xxxxxxxxxxxx This was caused by call to update the DPAAX table when VA mode was enabled, in which case the VA==IOVA address. 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 dfffa2a1dd..8c155ac688 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -420,8 +420,11 @@ rte_fslmc_probe(void) * * Error is ignored as relevant logs are handled within dpaax and * handling for unavailable dpaax table too is transparent to caller. + * + * And, the IOVA table is only applicable in case of PA mode. */ - dpaax_iova_table_populate(); + if (rte_eal_iova_mode() == RTE_IOVA_PA) + dpaax_iova_table_populate(); TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) { TAILQ_FOREACH(drv, &rte_fslmc_bus.driver_list, next) { @@ -518,7 +521,8 @@ rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver) /* Cleanup the PA->VA Translation table; From whereever this function * is called from. */ - dpaax_iova_table_depopulate(); + if (rte_eal_iova_mode() == RTE_IOVA_PA) + dpaax_iova_table_depopulate(); TAILQ_REMOVE(&fslmc_bus->driver_list, driver, next); /* Update Bus references */