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

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

2014-07-11 Thread Joerg Roedel
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; > +

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 wrote: > On 7/9/2014 5:40 PM, Rob Clark wrote: >> On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan wrote: >>> On 7/8/2014 4:49 PM, Rob Clark wrote: On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan wrote: > Hi Hiroshi, > > On 7/3/2014 9:29 PM, H

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 wrote: >> On 7/8/2014 4:49 PM, Rob Clark wrote: >>> On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan wrote: Hi Hiroshi, On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: > Hi Olav, > > Olav Haugan wr

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 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 wrote: >> > On 7/8/2014 4:49 PM, Rob Clark wrote: >> >> On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan >> >> wrote: >> >>> Hi Hiroshi,

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 wrote: > > On 7/8/2014 4:49 PM, Rob Clark wrote: > >> On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan 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-09 Thread Rob Clark
On Wed, Jul 9, 2014 at 8:03 PM, Olav Haugan wrote: > On 7/8/2014 4:49 PM, Rob Clark wrote: >> On Tue, Jul 8, 2014 at 5:53 PM, Olav Haugan wrote: >>> Hi Hiroshi, >>> >>> On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: Hi Olav, Olav Haugan writes: > Mapping and unmapping are more

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 wrote: >> Hi Hiroshi, >> >> On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: >>> Hi Olav, >>> >>> Olav Haugan writes: >>> Mapping and unmapping are more often than not in the critical path. map_range and unmap_r

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 wrote: > Hi Hiroshi, > > On 7/3/2014 9:29 PM, Hiroshi Doyu wrote: >> Hi Olav, >> >> Olav Haugan writes: >> >>> Mapping and unmapping are more often than not in the critical path. >>> map_range and unmap_range allows SMMU driver implementations to optimi

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 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 S

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

2014-07-03 Thread Hiroshi Doyu
Hi Olav, Olav Haugan 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 physical address, do TL

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

2014-07-01 Thread Varun Sethi
nux-foundation.org; > thierry.red...@gmail.com; vgan...@codeaurora.org; linux-arm- > ker...@lists.infradead.org > Subject: Re: [RFC/PATCH 2/7] iommu-api: Add map_range/unmap_range > functions > > Hi Olav, > > On Mon, Jun 30, 2014 at 05:51:51PM +0100, Olav Haugan wrote: > > Mapp

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

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