bus/fslmc: remove workaround for smmu mapping
authorHemant Agrawal <hemant.agrawal@nxp.com>
Mon, 17 Jul 2017 08:43:10 +0000 (14:13 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 19 Jul 2017 05:26:08 +0000 (08:26 +0300)
This is not required any more for A72 based dpaa2 systems.
(A57 based platform is not in production anymore)

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/bus/fslmc/fslmc_vfio.c
drivers/bus/fslmc/fslmc_vfio.h
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c

index a3ac0a6..45e5927 100644 (file)
@@ -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;
index d1259e1..0aff9b1 100644 (file)
@@ -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);
 
index cdeb84c..283441b 100644 (file)
@@ -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, &reg_info)) {
                PMD_INIT_LOG(ERR, "vfio: error getting region info\n");