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 v2 2/2] iommu/arm-smmu: Do not access non-existing SMR registers

2014-08-06 Thread Olav Haugan
On 8/6/2014 10:35 AM, Will Deacon wrote: > Hi Olav, > > On Wed, Aug 06, 2014 at 05:44:38PM +0100, Olav Haugan wrote: >> On 8/6/2014 3:19 AM, Will Deacon wrote: >>> On Mon, Aug 04, 2014 at 07:01:03PM +0100, Olav Haugan wrote: The SMR registers do not exist when stream matching is not supp

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 v2 2/2] iommu/arm-smmu: Do not access non-existing SMR registers

2014-08-06 Thread Will Deacon
Hi Olav, On Wed, Aug 06, 2014 at 05:44:38PM +0100, Olav Haugan wrote: > On 8/6/2014 3:19 AM, Will Deacon wrote: > > On Mon, Aug 04, 2014 at 07:01:03PM +0100, Olav Haugan wrote: > >> The SMR registers do not exist when stream matching is not > >> supported by the hardware. Avoid writing to this reg

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 v2 2/2] iommu/arm-smmu: Do not access non-existing SMR registers

2014-08-06 Thread Olav Haugan
On 8/6/2014 3:19 AM, Will Deacon wrote: > Hi Olav, > > On Mon, Aug 04, 2014 at 07:01:03PM +0100, Olav Haugan wrote: >> The SMR registers do not exist when stream matching is not >> supported by the hardware. Avoid writing to this register if not needed. >> >> Signed-off-by: Olav Haugan >> --- >>

[PATCH 03/15] iommu/arm-smmu: fix decimal printf format specifiers prefixed with 0x

2014-08-06 Thread Hans Wennborg
The prefix suggests the number should be printed in hex, so use the %x specifier to do that. Found by using regex suggested by Joe Perches. Signed-off-by: Hans Wennborg --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/dr

Re: [PATCH 03/15] iommu/arm-smmu: fix decimal printf format specifiers prefixed with 0x

2014-08-06 Thread Will Deacon
On Wed, Aug 06, 2014 at 05:42:01AM +0100, Hans Wennborg wrote: > The prefix suggests the number should be printed in hex, so use > the %x specifier to do that. > > Found by using regex suggested by Joe Perches. > > Signed-off-by: Hans Wennborg > --- > drivers/iommu/arm-smmu.c | 2 +- > 1 file c

Re: [PATCH v2 2/2] iommu/arm-smmu: Do not access non-existing SMR registers

2014-08-06 Thread Will Deacon
Hi Olav, On Mon, Aug 04, 2014 at 07:01:03PM +0100, Olav Haugan wrote: > The SMR registers do not exist when stream matching is not > supported by the hardware. Avoid writing to this register if not needed. > > Signed-off-by: Olav Haugan > --- > drivers/iommu/arm-smmu.c | 5 - > 1 file chang