From: Hemant Agrawal Date: Mon, 17 Jul 2017 08:43:10 +0000 (+0530) Subject: bus/fslmc: remove workaround for smmu mapping X-Git-Tag: spdx-start~2475 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b4d75d98f5696d6b4aab01c368a558f1e24e5c1f;p=dpdk.git bus/fslmc: remove workaround for smmu mapping This is not required any more for A72 based dpaa2 systems. (A57 based platform is not in production anymore) Signed-off-by: Hemant Agrawal --- diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index a3ac0a66c5..45e5927702 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -186,29 +186,6 @@ static int vfio_map_irq_region(struct fslmc_vfio_group *group) return -errno; } -int vfio_dmamap_mem_region(uint64_t vaddr, - uint64_t iova, - uint64_t size) -{ - struct fslmc_vfio_group *group; - struct vfio_iommu_type1_dma_map dma_map = { - .argsz = sizeof(dma_map), - .flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE, - }; - - dma_map.vaddr = vaddr; - dma_map.size = size; - dma_map.iova = iova; - - /* SET DMA MAP for IOMMU */ - group = &vfio_groups[0]; - if (ioctl(group->container->fd, VFIO_IOMMU_MAP_DMA, &dma_map)) { - FSLMC_VFIO_LOG(ERR, "VFIO_IOMMU_MAP_DMA (errno = %d)", errno); - return -1; - } - return 0; -} - int rte_fslmc_vfio_dmamap(void) { int ret; diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h index d1259e1222..0aff9b1fcf 100644 --- a/drivers/bus/fslmc/fslmc_vfio.h +++ b/drivers/bus/fslmc/fslmc_vfio.h @@ -85,11 +85,6 @@ struct rte_dpaa2_object { rte_fslmc_obj_create_t create; }; -int vfio_dmamap_mem_region( - uint64_t vaddr, - uint64_t iova, - uint64_t size); - int rte_dpaa2_intr_enable(struct rte_intr_handle *intr_handle, uint32_t index); diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index cdeb84c70f..283441b4f6 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -469,16 +469,6 @@ dpaa2_create_dpio_device(struct fslmc_vfio_device *vdev, PROT_WRITE | PROT_READ, MAP_SHARED, vfio_dev_fd, reg_info.offset); - /* Create Mapping for QBMan Cache Enabled area. This is a fix for - * SMMU fault for DQRR statshing transaction. - */ - if (vfio_dmamap_mem_region(dpio_dev->qbman_portal_ce_paddr, - reg_info.offset, reg_info.size)) { - PMD_INIT_LOG(ERR, "DMAMAP for Portal CE area failed.\n"); - rte_free(dpio_dev); - return -1; - } - reg_info.index = 1; if (ioctl(vfio_dev_fd, VFIO_DEVICE_GET_REGION_INFO, ®_info)) { PMD_INIT_LOG(ERR, "vfio: error getting region info\n");