Skip to contentSkip to conversation

iommu/sprd: Add missing force_aperture

PATCH Applied Jason Gunthorpe 3 participants 3 messages Jul 24, 2023 – Aug 7, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/sprd: Add missing force_aperture

force_aperture was intended to false only by GART drivers that have an identity translation outside the aperture. This does not describe sprd, so add the missing 'force_aperture = true'.

Fixes b23e4fc4e3fa ("iommu: add Unisoc IOMMU basic driver")
---
 drivers/iommu/sprd-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/sprd-iommu.c +1 -0
index af68b3a2c123ab..183ca889a6f9c4 100644
@@ -145,6 +145,7 @@ static struct iommu_domain *sprd_iommu_domain_alloc_paging(struct device *dev)
 
 	dom->domain.geometry.aperture_start = 0;
 	dom->domain.geometry.aperture_end = SZ_256M - 1;
+	dom->domain.geometry.force_aperture = true;
 
 	return &dom->domain;
 }

base-commit: b9e8d053f9e8b9d3aa1b5113e3fcfb66ef450564

Signature · 1 line
2.41.0
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jason Gunthorpe

force_aperture was intended to false only by GART drivers that have an identity translation outside the aperture. This does not describe sprd, so add the missing 'force_aperture = true'.

Fixes b23e4fc4e3fa ("iommu: add Unisoc IOMMU basic driver")

Thanks,
Chunyan

Quoted 21 lines
---
 drivers/iommu/sprd-iommu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/iommu/sprd-iommu.c +1 -0
index af68b3a2c123ab..183ca889a6f9c4 100644
@@ -145,6 +145,7 @@ static struct iommu_domain *sprd_iommu_domain_alloc_paging(struct device *dev)
 
        dom->domain.geometry.aperture_start = 0;
        dom->domain.geometry.aperture_end = SZ_256M - 1;
+       dom->domain.geometry.force_aperture = true;
 
        return &dom->domain;
 }

base-commit: b9e8d053f9e8b9d3aa1b5113e3fcfb66ef450564 --
2.41.0