Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-08 Thread Konrad Rzeszutek Wilk
On Thu, Aug 07, 2014 at 02:52:56PM -0700, Olav Haugan wrote: > On 8/6/2014 11:24 PM, Thierry Reding wrote: > > On Wed, Aug 06, 2014 at 04:28:45PM -0700, Olav Haugan wrote: > >> On 8/6/2014 1:17 PM, Joerg Roedel wrote: > >>> On Wed, Aug 06, 2014 at 10:08:55AM -0700, Olav Haugan wrote: > so you

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-07 Thread Olav Haugan
On 8/6/2014 11:24 PM, Thierry Reding wrote: > On Wed, Aug 06, 2014 at 04:28:45PM -0700, Olav Haugan wrote: >> On 8/6/2014 1:17 PM, Joerg Roedel wrote: >>> On Wed, Aug 06, 2014 at 10:08:55AM -0700, Olav Haugan wrote: so you are suggesting that I check in "bus_set_iommu()" whether the drive

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-06 Thread Thierry Reding
On Wed, Aug 06, 2014 at 04:28:45PM -0700, Olav Haugan wrote: > On 8/6/2014 1:17 PM, Joerg Roedel wrote: > > On Wed, Aug 06, 2014 at 10:08:55AM -0700, Olav Haugan wrote: > >> so you are suggesting that I check in "bus_set_iommu()" whether the > >> driver has set the map_sg/unmap_sg function pointers

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-06 Thread Olav Haugan
On 8/6/2014 1:17 PM, Joerg Roedel wrote: > On Wed, Aug 06, 2014 at 10:08:55AM -0700, Olav Haugan wrote: >> so you are suggesting that I check in "bus_set_iommu()" whether the >> driver has set the map_sg/unmap_sg function pointers or not and if not >> set it to the default? Is bus_set_iommu() the o

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-06 Thread Joerg Roedel
On Wed, Aug 06, 2014 at 10:08:55AM -0700, Olav Haugan wrote: > so you are suggesting that I check in "bus_set_iommu()" whether the > driver has set the map_sg/unmap_sg function pointers or not and if not > set it to the default? Is bus_set_iommu() the only way drivers can set > up the callbacks? T

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-06 Thread Olav Haugan
On 8/5/2014 8:13 AM, Konrad Rzeszutek Wilk wrote: > On Thu, Jul 31, 2014 at 05:54:44PM -0700, Olav Haugan wrote: >> Mapping and unmapping are more often than not in the critical path. >> map_sg and unmap_sg allows IOMMU driver implementations to optimize >> the process of mapping and unmapping buff

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-05 Thread Konrad Rzeszutek Wilk
On Thu, Jul 31, 2014 at 05:54:44PM -0700, Olav Haugan wrote: > Mapping and unmapping are more often than not in the critical path. > map_sg and unmap_sg allows IOMMU driver implementations to optimize > the process of mapping and unmapping buffers into the IOMMU page tables. > > Instead of mapping

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-04 Thread Olav Haugan
Any more comments on this from anyone before I submit v5? On 8/1/2014 9:44 AM, Olav Haugan wrote: > Hi Will, > > On 8/1/2014 1:22 AM, Will Deacon wrote: >> Hi Olav, >> >> On Fri, Aug 01, 2014 at 01:54:44AM +0100, Olav Haugan wrote: >>> Mapping and unmapping are more often than not in the critical

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-01 Thread Olav Haugan
Hi Will, On 8/1/2014 1:22 AM, Will Deacon wrote: > Hi Olav, > > On Fri, Aug 01, 2014 at 01:54:44AM +0100, Olav Haugan wrote: >> Mapping and unmapping are more often than not in the critical path. >> map_sg and unmap_sg allows IOMMU driver implementations to optimize >> the process of mapping and

Re: [PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-08-01 Thread Will Deacon
Hi Olav, On Fri, Aug 01, 2014 at 01:54:44AM +0100, Olav Haugan wrote: > Mapping and unmapping are more often than not in the critical path. > map_sg and unmap_sg allows IOMMU driver implementations to optimize > the process of mapping and unmapping buffers into the IOMMU page tables. > > Instead

[PATCH v4 1/1] iommu-api: Add map_sg/unmap_sg functions

2014-07-31 Thread Olav Haugan
Mapping and unmapping are more often than not in the critical path. map_sg and unmap_sg allows IOMMU driver implementations to optimize the process of mapping and unmapping buffers into the IOMMU page tables. Instead of mapping a buffer one page at a time and requiring potentially expensive TLB op