Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2021-01-18 Thread Robin Murphy
On 2021-01-18 16:58, Will Deacon wrote: On Mon, Jan 18, 2021 at 04:35:22PM +, Robin Murphy wrote: On 2020-12-16 10:36, Yong Wu wrote: In current iommu_unmap, this code is: iommu_iotlb_gather_init(_gather); ret = __iommu_unmap(domain, iova, size, _gather);

Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2021-01-18 Thread Will Deacon
On Mon, Jan 18, 2021 at 04:35:22PM +, Robin Murphy wrote: > On 2020-12-16 10:36, Yong Wu wrote: > > In current iommu_unmap, this code is: > > > > iommu_iotlb_gather_init(_gather); > > ret = __iommu_unmap(domain, iova, size, _gather); > > iommu_iotlb_sync(domain, _gather); > > > >

Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2021-01-18 Thread Robin Murphy
On 2020-12-16 10:36, Yong Wu wrote: In current iommu_unmap, this code is: iommu_iotlb_gather_init(_gather); ret = __iommu_unmap(domain, iova, size, _gather); iommu_iotlb_sync(domain, _gather); We could gather the whole iova range in __iommu_unmap, and then do tlb

Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2021-01-08 Thread Tomasz Figa
On Wed, Dec 23, 2020 at 8:00 PM Robin Murphy wrote: > > On 2020-12-23 08:56, Tomasz Figa wrote: > > On Wed, Dec 16, 2020 at 06:36:06PM +0800, Yong Wu wrote: > >> In current iommu_unmap, this code is: > >> > >> iommu_iotlb_gather_init(_gather); > >> ret = __iommu_unmap(domain, iova,

Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2021-01-08 Thread Tomasz Figa
On Wed, Dec 23, 2020 at 8:00 PM Robin Murphy wrote: > > On 2020-12-23 08:56, Tomasz Figa wrote: > > On Wed, Dec 16, 2020 at 06:36:06PM +0800, Yong Wu wrote: > >> In current iommu_unmap, this code is: > >> > >> iommu_iotlb_gather_init(_gather); > >> ret = __iommu_unmap(domain, iova,

Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2020-12-23 Thread Robin Murphy
On 2020-12-23 08:56, Tomasz Figa wrote: On Wed, Dec 16, 2020 at 06:36:06PM +0800, Yong Wu wrote: In current iommu_unmap, this code is: iommu_iotlb_gather_init(_gather); ret = __iommu_unmap(domain, iova, size, _gather); iommu_iotlb_sync(domain, _gather); We could gather

Re: [PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2020-12-23 Thread Tomasz Figa
On Wed, Dec 16, 2020 at 06:36:06PM +0800, Yong Wu wrote: > In current iommu_unmap, this code is: > > iommu_iotlb_gather_init(_gather); > ret = __iommu_unmap(domain, iova, size, _gather); > iommu_iotlb_sync(domain, _gather); > > We could gather the whole iova range in

[PATCH v3 6/7] iommu/mediatek: Gather iova in iommu_unmap to achieve tlb sync once

2020-12-16 Thread Yong Wu
In current iommu_unmap, this code is: iommu_iotlb_gather_init(_gather); ret = __iommu_unmap(domain, iova, size, _gather); iommu_iotlb_sync(domain, _gather); We could gather the whole iova range in __iommu_unmap, and then do tlb synchronization in the iommu_iotlb_sync.