From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ACA4745BB0; Wed, 23 Oct 2024 14:02:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 00B1042E00; Wed, 23 Oct 2024 14:00:26 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id A9158427B1 for ; Wed, 23 Oct 2024 14:00:04 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 86FD2202592; Wed, 23 Oct 2024 14:00:04 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 49072202589; Wed, 23 Oct 2024 14:00:04 +0200 (CEST) Received: from lsv03379.swis.in-blr01.nxp.com (lsv03379.swis.in-blr01.nxp.com [92.120.147.188]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id BE1FE183DC02; Wed, 23 Oct 2024 20:00:03 +0800 (+08) From: vanshika.shukla@nxp.com To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Cc: Jun Yang Subject: [v5 17/42] bus/fslmc: remove VFIO IRQ mapping Date: Wed, 23 Oct 2024 17:29:30 +0530 Message-Id: <20241023115955.1207617-18-vanshika.shukla@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241023115955.1207617-1-vanshika.shukla@nxp.com> References: <20241022191256.516818-1-vanshika.shukla@nxp.com> <20241023115955.1207617-1-vanshika.shukla@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Jun Yang Remove unused GITS translator VFIO mapping. Signed-off-by: Jun Yang --- drivers/bus/fslmc/fslmc_vfio.c | 50 ---------------------------------- 1 file changed, 50 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index 2bf0a7b835..9d913781ae 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -49,7 +49,6 @@ static struct fslmc_vfio_container s_vfio_container; /* Currently we only support single group/process. */ static const char *fslmc_group; /* dprc.x*/ -static uint32_t *msi_intr_vaddr; static void *(*rte_mcp_ptr_list); struct fslmc_dmaseg { @@ -758,49 +757,6 @@ vfio_connect_container(int vfio_container_fd, return fslmc_vfio_connect_container(vfio_group_fd); } -static int vfio_map_irq_region(void) -{ - int ret, fd; - unsigned long *vaddr = NULL; - struct vfio_iommu_type1_dma_map map = { - .argsz = sizeof(map), - .flags = VFIO_DMA_MAP_FLAG_READ | VFIO_DMA_MAP_FLAG_WRITE, - .vaddr = 0x6030000, - .iova = 0x6030000, - .size = 0x1000, - }; - const char *group_name = fslmc_vfio_get_group_name(); - - fd = fslmc_vfio_group_fd_by_name(group_name); - if (fd <= 0) { - DPAA2_BUS_ERR("%s: Get fd by name(%s) failed(%d)", - __func__, group_name, fd); - if (fd < 0) - return fd; - return -EIO; - } - if (!fslmc_vfio_container_connected(fd)) { - DPAA2_BUS_ERR("Container is not connected"); - return -EIO; - } - - vaddr = (unsigned long *)mmap(NULL, 0x1000, PROT_WRITE | - PROT_READ, MAP_SHARED, fd, 0x6030000); - if (vaddr == MAP_FAILED) { - DPAA2_BUS_ERR("Unable to map region (errno = %d)", errno); - return -ENOMEM; - } - - msi_intr_vaddr = (uint32_t *)((char *)(vaddr) + 64); - map.vaddr = (unsigned long)vaddr; - ret = ioctl(fslmc_vfio_container_fd(), VFIO_IOMMU_MAP_DMA, &map); - if (!ret) - return 0; - - DPAA2_BUS_ERR("Unable to map DMA address (errno = %d)", errno); - return ret; -} - static int fslmc_map_dma(uint64_t vaddr, rte_iova_t iovaddr, size_t len) { @@ -1222,12 +1178,6 @@ int rte_fslmc_vfio_dmamap(void) DPAA2_BUS_DEBUG("Total %d segments found.", i); - /* TODO - This is a W.A. as VFIO currently does not add the mapping of - * the interrupt region to SMMU. This should be removed once the - * support is added in the Kernel. - */ - vfio_map_irq_region(); - /* Existing segments have been mapped and memory callback for hotplug * has been installed. */ -- 2.25.1