Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Laurent Pinchart
On Thursday 01 September 2011 16:02:35 Ohad Ben-Cohen wrote: > On Thu, Sep 1, 2011 at 4:59 PM, Laurent Pinchart > > wrote: > > It looks good to me. > > Thanks. > > > I haven't tested it though. > > I did, but I always get aligned buffers so my testing is a bit moot. I > can't see how unmap cou

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Ohad Ben-Cohen
On Thu, Sep 1, 2011 at 4:59 PM, Laurent Pinchart wrote: > It looks good to me. Thanks. > I haven't tested it though. I did, but I always get aligned buffers so my testing is a bit moot. I can't see how unmap could work without this patch, though, so I'll squash this and re-post. -- To unsubscri

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Laurent Pinchart
Hi Ohad, On Thursday 01 September 2011 13:47:26 Ohad Ben-Cohen wrote: > On Wed, Aug 31, 2011 at 1:52 PM, Ohad Ben-Cohen wrote: > > From: Laurent Pinchart > > > > omap_iovmm requires page-aligned buffers, and that sometimes causes > > omap3isp failures (i.e. whenever the buffer passed from users

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Roedel, Joerg
On Thu, Sep 01, 2011 at 09:31:13AM -0400, Laurent Pinchart wrote: > Hi Ohad, > > On Thursday 01 September 2011 13:47:26 Ohad Ben-Cohen wrote: > > On Wed, Aug 31, 2011 at 1:52 PM, Ohad Ben-Cohen wrote: > > > From: Laurent Pinchart > > > > > > omap_iovmm requires page-aligned buffers, and that so

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Laurent Pinchart
Hi Ohad, On Thursday 01 September 2011 13:47:26 Ohad Ben-Cohen wrote: > On Wed, Aug 31, 2011 at 1:52 PM, Ohad Ben-Cohen wrote: > > From: Laurent Pinchart > > > > omap_iovmm requires page-aligned buffers, and that sometimes causes > > omap3isp failures (i.e. whenever the buffer passed from users

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Ohad Ben-Cohen
On Wed, Aug 31, 2011 at 1:52 PM, Ohad Ben-Cohen wrote: > From: Laurent Pinchart > > omap_iovmm requires page-aligned buffers, and that sometimes causes > omap3isp failures (i.e. whenever the buffer passed from userspace is not > page-aligned). > > Remove this limitation by rounding the address of

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-09-01 Thread Roedel, Joerg
On Wed, Aug 31, 2011 at 12:56:26PM -0400, Laurent Pinchart wrote: > True, but if we implement address rounding transparently in the IOMMU layer > Ohad's concern can be valid, depending on whether the device is trusted. If > we > decide to push address rounding to the drivers that decision can be

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-08-31 Thread Ohad Ben-Cohen
Hi Laurent, Joerg, On Wed, Aug 31, 2011 at 7:56 PM, Laurent Pinchart wrote: > On Wednesday 31 August 2011 15:06:42 Roedel, Joerg wrote: >> Do you mean the parts of the pages you map to the device that are not in >> the requested range (basically everything before offset and all after >> size)? >>

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-08-31 Thread Laurent Pinchart
Hi Joerg, On Wednesday 31 August 2011 15:06:42 Roedel, Joerg wrote: > On Wed, Aug 31, 2011 at 06:52:08AM -0400, Ohad Ben-Cohen wrote: > > On Mon, Aug 29, 2011 at 10:36 PM, Ohad Ben-Cohen wrote: > > > From: Laurent Pinchart > > > > > > omap_iovmm requires page-aligned buffers, and that sometimes

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-08-31 Thread Roedel, Joerg
On Wed, Aug 31, 2011 at 06:52:08AM -0400, Ohad Ben-Cohen wrote: > On Mon, Aug 29, 2011 at 10:36 PM, Ohad Ben-Cohen wrote: > > From: Laurent Pinchart > > > > omap_iovmm requires page-aligned buffers, and that sometimes causes > > omap3isp failures (i.e. whenever the buffer passed from userspace is

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-08-31 Thread Laurent Pinchart
Hi Ohad, On Wednesday 31 August 2011 12:52:08 Ohad Ben-Cohen wrote: > On Mon, Aug 29, 2011 at 10:36 PM, Ohad Ben-Cohen wrote: > > From: Laurent Pinchart > > > > omap_iovmm requires page-aligned buffers, and that sometimes causes > > omap3isp failures (i.e. whenever the buffer passed from usersp

Re: [PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-08-31 Thread Ohad Ben-Cohen
On Mon, Aug 29, 2011 at 10:36 PM, Ohad Ben-Cohen wrote: > From: Laurent Pinchart > > omap_iovmm requires page-aligned buffers, and that sometimes causes > omap3isp failures (i.e. whenever the buffer passed from userspace is not > page-aligned). > > Remove this limitation by rounding the address o

[PATCH] iommu: omap_iovmm: support non page-aligned buffers in iommu_vmap

2011-08-29 Thread Ohad Ben-Cohen
From: Laurent Pinchart omap_iovmm requires page-aligned buffers, and that sometimes causes omap3isp failures (i.e. whenever the buffer passed from userspace is not page-aligned). Remove this limitation by rounding the address of the first page entry down, and adding the offset back to the device