Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-14 Thread Olav Haugan
On 7/11/2014 3:20 AM, Joerg Roedel wrote: On Mon, Jun 30, 2014 at 09:51:51AM -0700, Olav Haugan wrote: +int iommu_map_range(struct iommu_domain *domain, unsigned int iova, +struct scatterlist *sg, unsigned int len, int prot) +{ +if (unlikely(domain-ops-map_range == NULL))

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-10 Thread Thierry Reding
On Wed, Jul 09, 2014 at 08:40:21PM -0400, Rob Clark wrote: On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan ohau...@codeaurora.org wrote: Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-10 Thread Rob Clark
On Thu, Jul 10, 2014 at 3:10 AM, Thierry Reding thierry.red...@gmail.com wrote: On Wed, Jul 09, 2014 at 08:40:21PM -0400, Rob Clark wrote: On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-10 Thread Olav Haugan
On 7/9/2014 5:40 PM, Rob Clark wrote: On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan ohau...@codeaurora.org wrote: Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: Hi Olav,

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-10 Thread Rob Clark
On Thu, Jul 10, 2014 at 6:43 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/9/2014 5:40 PM, Rob Clark wrote: On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan ohau...@codeaurora.org

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-09 Thread Olav Haugan
On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan ohau...@codeaurora.org wrote: Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: Hi Olav, Olav Haugan ohau...@codeaurora.org writes: Mapping and unmapping are more often than not in the critical path.

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-09 Thread Rob Clark
On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan ohau...@codeaurora.org wrote: On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan ohau...@codeaurora.org wrote: Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: Hi Olav, Olav Haugan ohau...@codeaurora.org writes:

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-08 Thread Olav Haugan
Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: Hi Olav, Olav Haugan ohau...@codeaurora.org writes: 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

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-08 Thread Rob Clark
On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan ohau...@codeaurora.org wrote: Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: Hi Olav, Olav Haugan ohau...@codeaurora.org writes: Mapping and unmapping are more often than not in the critical path. map_range and unmap_range allows SMMU

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-03 Thread Hiroshi Doyu
Hi Olav, Olav Haugan ohau...@codeaurora.org writes: 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

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-07-01 Thread Will Deacon
Hi Olav, On Mon, Jun 30, 2014 at 05:51:51PM +0100, 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 the process of mapping and unmapping buffers into the SMMU page tables. Instead of

[RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-06-30 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

Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range functions

2014-06-30 Thread Thierry Reding
On Mon, Jun 30, 2014 at 09:51:51AM -0700, Olav Haugan wrote: [...] +int iommu_map_range(struct iommu_domain *domain, unsigned int iova, + struct scatterlist *sg, unsigned int len, int prot) +{ + if (unlikely(domain-ops-map_range == NULL)) + return -ENODEV;