[PATCH 11/48] staging: etnaviv: fix off-by-one for iommu aperture end

Lucas Stach l.stach at pengutronix.de
Fri Sep 25 04:57:23 PDT 2015


From: Russell King <rmk+kernel at arm.linux.org.uk>

The aperture end address is inclusive, not exclusive.

Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
 drivers/staging/etnaviv/etnaviv_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/etnaviv/etnaviv_iommu.c b/drivers/staging/etnaviv/etnaviv_iommu.c
index 8f92578ea3ee..8aff23a310fb 100644
--- a/drivers/staging/etnaviv/etnaviv_iommu.c
+++ b/drivers/staging/etnaviv/etnaviv_iommu.c
@@ -209,7 +209,7 @@ struct iommu_domain *etnaviv_iommu_domain_alloc(struct etnaviv_gpu *gpu)
 	etnaviv_domain->domain.type = __IOMMU_DOMAIN_PAGING;
 	etnaviv_domain->domain.ops = &etnaviv_iommu_ops;
 	etnaviv_domain->domain.geometry.aperture_start = GPU_MEM_START;
-	etnaviv_domain->domain.geometry.aperture_end = GPU_MEM_START + PT_ENTRIES * SZ_4K;
+	etnaviv_domain->domain.geometry.aperture_end = GPU_MEM_START + PT_ENTRIES * SZ_4K - 1;
 
 	ret = __etnaviv_iommu_init(etnaviv_domain);
 	if (ret)
-- 
2.5.1



More information about the dri-devel mailing list