diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-09-07 15:41:38 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2017-10-10 11:35:31 +0200 |
commit | 86666c54c801da7860f9d273b5e6fc30e210e219 (patch) | |
tree | 3e1fbc380f4aa9503c9ae63863087fd7fafdbc89 /drivers/gpu | |
parent | bd2442bc1b4ef3f27dda28edeeb85a8603115a21 (diff) |
drm/etnaviv: iommuv1: remove map_lock
It wasn't protecting anything, as the single word writes used to
set up or tear down a translation are already inherently atomic,
so the spinlock is pure overhead.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c index 33084cbc8b27..2ffdb27e4ac2 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_iommu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_iommu.c @@ -42,7 +42,6 @@ struct etnaviv_iommu_domain { void *bad_page_cpu; dma_addr_t bad_page_dma; struct etnaviv_iommu_domain_pgtable pgtable; - spinlock_t map_lock; }; static struct etnaviv_iommu_domain *to_etnaviv_domain(struct iommu_domain *domain) @@ -81,8 +80,6 @@ static int __etnaviv_iommu_init(struct etnaviv_iommu_domain *etnaviv_domain) etnaviv_domain->pgtable.pgtable[i] = etnaviv_domain->bad_page_dma; - spin_lock_init(&etnaviv_domain->map_lock); - return 0; } @@ -110,9 +107,7 @@ static int etnaviv_iommuv1_map(struct iommu_domain *domain, unsigned long iova, if (size != SZ_4K) return -EINVAL; - spin_lock(&etnaviv_domain->map_lock); etnaviv_domain->pgtable.pgtable[index] = paddr; - spin_unlock(&etnaviv_domain->map_lock); return 0; } @@ -126,9 +121,7 @@ static size_t etnaviv_iommuv1_unmap(struct iommu_domain *domain, if (size != SZ_4K) return -EINVAL; - spin_lock(&etnaviv_domain->map_lock); etnaviv_domain->pgtable.pgtable[index] = etnaviv_domain->bad_page_dma; - spin_unlock(&etnaviv_domain->map_lock); return SZ_4K; } |