From 57fa44be7fdb0d8803ecf11886d41b5002eae8f2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 1 Apr 2021 17:52:49 +0200 Subject: iommu/fsl_pamu: hardcode the window address and size in pamu_config_ppaace The win_addr and win_size parameters are always set to 0 and 1 << 36 respectively, so just hard code them. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210401155256.298656-14-hch@lst.de Signed-off-by: Joerg Roedel --- drivers/iommu/fsl_pamu_domain.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'drivers/iommu/fsl_pamu_domain.c') diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c index c83f1e7c2cb0..32944d67baa4 100644 --- a/drivers/iommu/fsl_pamu_domain.c +++ b/drivers/iommu/fsl_pamu_domain.c @@ -78,8 +78,6 @@ static int update_liodn_stash(int liodn, struct fsl_dma_domain *dma_domain, static int pamu_set_liodn(struct fsl_dma_domain *dma_domain, struct device *dev, int liodn) { - struct iommu_domain *domain = &dma_domain->iommu_domain; - struct iommu_domain_geometry *geom = &domain->geometry; u32 omi_index = ~(u32)0; unsigned long flags; int ret; @@ -95,14 +93,10 @@ static int pamu_set_liodn(struct fsl_dma_domain *dma_domain, struct device *dev, ret = pamu_disable_liodn(liodn); if (ret) goto out_unlock; - ret = pamu_config_ppaace(liodn, geom->aperture_start, - geom->aperture_end + 1, omi_index, - dma_domain->stash_id, 0); + ret = pamu_config_ppaace(liodn, omi_index, dma_domain->stash_id, 0); if (ret) goto out_unlock; - ret = pamu_config_ppaace(liodn, geom->aperture_start, - geom->aperture_end + 1, ~(u32)0, - dma_domain->stash_id, + ret = pamu_config_ppaace(liodn, ~(u32)0, dma_domain->stash_id, PAACE_AP_PERMS_QUERY | PAACE_AP_PERMS_UPDATE); out_unlock: spin_unlock_irqrestore(&iommu_lock, flags); -- cgit v1.2.3