Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-24 Thread Joerg Roedel
On Wed, Jul 23, 2014 at 10:49:55AM -0700, Olav Haugan wrote: Joerg, can you comment on what you envisioned when you suggested that we add the fallback? The problem is that we already have tons of IOMMU drivers in the tree which don't provide these call-backs. So adding this API extension

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-24 Thread Thierry Reding
On Thu, Jul 24, 2014 at 11:34:27AM +0200, Joerg Roedel wrote: On Wed, Jul 23, 2014 at 10:49:55AM -0700, Olav Haugan wrote: Joerg, can you comment on what you envisioned when you suggested that we add the fallback? The problem is that we already have tons of IOMMU drivers in the tree

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-23 Thread Olav Haugan
On 7/22/2014 12:45 AM, Thierry Reding wrote: On Mon, Jul 21, 2014 at 05:59:22PM -0700, Olav Haugan wrote: On 7/17/2014 1:21 AM, Thierry Reding wrote: On Wed, Jul 16, 2014 at 06:01:57PM -0700, Olav Haugan wrote: [...] Additionally, the mapping operation would be faster in general since

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-22 Thread Thierry Reding
On Mon, Jul 21, 2014 at 05:59:22PM -0700, Olav Haugan wrote: On 7/17/2014 1:21 AM, Thierry Reding wrote: On Wed, Jul 16, 2014 at 06:01:57PM -0700, Olav Haugan wrote: [...] Additionally, the mapping operation would be faster in general since clients does not have to keep calling map API

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-22 Thread Rob Clark
On Mon, Jul 21, 2014 at 8:59 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/17/2014 1:21 AM, Thierry Reding wrote: On Wed, Jul 16, 2014 at 06:01:57PM -0700, Olav Haugan wrote: Mapping and unmapping are more often than not in the critical path. map_range and unmap_range allows SMMU driver

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-21 Thread Olav Haugan
On 7/17/2014 1:21 AM, Thierry Reding wrote: On Wed, Jul 16, 2014 at 06:01:57PM -0700, Olav Haugan wrote: Mapping and unmapping are more often than not in the critical path. map_range and unmap_range allows SMMU driver implementations to optimize s/SMMU/IOMMU/ the process of mapping and

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-17 Thread Thierry Reding
On Wed, Jul 16, 2014 at 06:01:57PM -0700, Olav Haugan wrote: Mapping and unmapping are more often than not in the critical path. map_range and unmap_range allows SMMU driver implementations to optimize s/SMMU/IOMMU/ the process of mapping and unmapping buffers into the SMMU page tables.

[PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-16 Thread Olav Haugan
Mapping and unmapping are more often than not in the critical path. map_range and unmap_range allows SMMU driver implementations to optimize the process of mapping and unmapping buffers into the SMMU page tables. Instead of mapping one physical address, do TLB operation (expensive), mapping, do