Message ID | 20210401155256.298656-2-hch@lst.de |
---|---|
State | Accepted |
Commit | 47685cb202d1aff6f70a2bb91e8271392fefea84 |
Headers | show |
Series | [01/20] iommu: remove the unused domain_window_disable method | expand |
Hello: This series was applied to qcom/linux.git (refs/heads/for-next): On Thu, 1 Apr 2021 17:52:37 +0200 you wrote: > domain_window_disable is wired up by fsl_pamu, but never actually called. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > Acked-by: Will Deacon <will@kernel.org> > Acked-by: Li Yang <leoyang.li@nxp.com> > --- > drivers/iommu/fsl_pamu_domain.c | 48 --------------------------------- > include/linux/iommu.h | 2 -- > 2 files changed, 50 deletions(-) Here is the summary with links: - [01/20] iommu: remove the unused domain_window_disable method https://git.kernel.org/qcom/c/47685cb202d1 - [02/20] iommu/fsl_pamu: remove fsl_pamu_get_domain_attr https://git.kernel.org/qcom/c/392825e0c76c - [03/20] iommu/fsl_pamu: remove support for setting DOMAIN_ATTR_GEOMETRY https://git.kernel.org/qcom/c/f7641bb71d26 - [04/20] iommu/fsl_pamu: merge iommu_alloc_dma_domain into fsl_pamu_domain_alloc https://git.kernel.org/qcom/c/c8224508074e - [05/20] iommu/fsl_pamu: remove support for multiple windows https://git.kernel.org/qcom/c/ba58d1216e2b - [06/20] iommu/fsl_pamu: remove ->domain_window_enable https://git.kernel.org/qcom/c/376dfd2a2ff4 - [07/20] iommu/fsl_pamu: replace DOMAIN_ATTR_FSL_PAMU_STASH with a direct call https://git.kernel.org/qcom/c/4eeb96f6efac - [08/20] iommu/fsl_pamu: merge pamu_set_liodn and map_liodn https://git.kernel.org/qcom/c/dae7747ae41c - [09/20] iommu/fsl_pamu: merge handle_attach_device into fsl_pamu_attach_device https://git.kernel.org/qcom/c/85e362ca4625 - [10/20] iommu/fsl_pamu: enable the liodn when attaching a device https://git.kernel.org/qcom/c/7d61cb6ff012 - [11/20] iommu/fsl_pamu: remove the snoop_id field https://git.kernel.org/qcom/c/fd78696ece54 - [12/20] iommu/fsl_pamu: remove the rpn and snoop_id arguments to pamu_config_ppaac https://git.kernel.org/qcom/c/151f9414b88b - [13/20] iommu/fsl_pamu: hardcode the window address and size in pamu_config_ppaace https://git.kernel.org/qcom/c/57fa44be7fdb - [14/20] iommu: remove DOMAIN_ATTR_PAGING https://git.kernel.org/qcom/c/9fb5fad562fa - [15/20] iommu: remove DOMAIN_ATTR_GEOMETRY https://git.kernel.org/qcom/c/bc9a05eef113 - [16/20] iommu: remove DOMAIN_ATTR_NESTING https://git.kernel.org/qcom/c/7e147547783a - [17/20] iommu: remove iommu_set_cmd_line_dma_api and iommu_cmd_line_dma_api https://git.kernel.org/qcom/c/3189713a1b84 - [18/20] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE https://git.kernel.org/qcom/c/a250c23f15c2 - [19/20] iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG https://git.kernel.org/qcom/c/4fc52b81e87b - [20/20] iommu: remove iommu_domain_{get,set}_attr https://git.kernel.org/qcom/c/7876a83ffe8c You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index b2110767caf49c..53380cf1fa452f 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -473,53 +473,6 @@ static int update_domain_mapping(struct fsl_dma_domain *dma_domain, u32 wnd_nr) return ret; } -static int disable_domain_win(struct fsl_dma_domain *dma_domain, u32 wnd_nr) -{ - struct device_domain_info *info; - int ret = 0; - - list_for_each_entry(info, &dma_domain->devices, link) { - if (dma_domain->win_cnt == 1 && dma_domain->enabled) { - ret = pamu_disable_liodn(info->liodn); - if (!ret) - dma_domain->enabled = 0; - } else { - ret = pamu_disable_spaace(info->liodn, wnd_nr); - } - } - - return ret; -} - -static void fsl_pamu_window_disable(struct iommu_domain *domain, u32 wnd_nr) -{ - struct fsl_dma_domain *dma_domain = to_fsl_dma_domain(domain); - unsigned long flags; - int ret; - - spin_lock_irqsave(&dma_domain->domain_lock, flags); - if (!dma_domain->win_arr) { - pr_debug("Number of windows not configured\n"); - spin_unlock_irqrestore(&dma_domain->domain_lock, flags); - return; - } - - if (wnd_nr >= dma_domain->win_cnt) { - pr_debug("Invalid window index\n"); - spin_unlock_irqrestore(&dma_domain->domain_lock, flags); - return; - } - - if (dma_domain->win_arr[wnd_nr].valid) { - ret = disable_domain_win(dma_domain, wnd_nr); - if (!ret) { - dma_domain->win_arr[wnd_nr].valid = 0; - dma_domain->mapped--; - } - } - - spin_unlock_irqrestore(&dma_domain->domain_lock, flags); -} static int fsl_pamu_window_enable(struct iommu_domain *domain, u32 wnd_nr, phys_addr_t paddr, u64 size, int prot) @@ -1032,7 +985,6 @@ static const struct iommu_ops fsl_pamu_ops = { .attach_dev = fsl_pamu_attach_device, .detach_dev = fsl_pamu_detach_device, .domain_window_enable = fsl_pamu_window_enable, - .domain_window_disable = fsl_pamu_window_disable, .iova_to_phys = fsl_pamu_iova_to_phys, .domain_set_attr = fsl_pamu_set_domain_attr, .domain_get_attr = fsl_pamu_get_domain_attr, diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 5e7fe519430af4..47c8b318d8f523 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -209,7 +209,6 @@ struct iommu_iotlb_gather { * @put_resv_regions: Free list of reserved regions for a device * @apply_resv_region: Temporary helper call-back for iova reserved ranges * @domain_window_enable: Configure and enable a particular window for a domain - * @domain_window_disable: Disable a particular window for a domain * @of_xlate: add OF master IDs to iommu grouping * @is_attach_deferred: Check if domain attach should be deferred from iommu * driver init to device driver init (default no) @@ -270,7 +269,6 @@ struct iommu_ops { /* Window handling functions */ int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr, phys_addr_t paddr, u64 size, int prot); - void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr); int (*of_xlate)(struct device *dev, struct of_phandle_args *args); bool (*is_attach_deferred)(struct iommu_domain *domain, struct device *dev);