[PATCH RFC 048/111] staging: etnaviv: mmuv1: ensure we unmap all entries

Lucas Stach l.stach at pengutronix.de
Thu Apr 2 08:29:50 PDT 2015


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

Ensure that we unmap all MMU entries when unmapping a region.  We
fail to do this because we assume that the return value from the
unmap method should be zero.  It should be the size of entry which
has been unmapped.

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 d8ac05aa2cd3..89bc2ffadf86 100644
--- a/drivers/staging/etnaviv/etnaviv_iommu.c
+++ b/drivers/staging/etnaviv/etnaviv_iommu.c
@@ -134,7 +134,7 @@ static size_t etnaviv_iommu_unmap(struct iommu_domain *domain,
 	pgtable_write(&etnaviv_domain->pgtable, iova, ~0);
 	spin_unlock(&etnaviv_domain->map_lock);
 
-	return 0;
+	return SZ_4K;
 }
 
 static phys_addr_t etnaviv_iommu_iova_to_phys(struct iommu_domain *domain,
-- 
2.1.4



More information about the dri-devel mailing list