Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-08 Thread Laurent Pinchart
Hi Russell, On Monday 06 June 2011 20:00:52 Russell King - ARM Linux wrote: On Mon, Jun 06, 2011 at 06:54:10PM +0200, Laurent Pinchart wrote: Of course not, but if the scatterlist is only touched by kernel code, it doesn't need to be contiguous in memory. It could be allocated with

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-06 Thread Laurent Pinchart
Hi Russell, On Friday 03 June 2011 08:32:12 Russell King - ARM Linux wrote: On Fri, Jun 03, 2011 at 02:12:47AM +0200, Laurent Pinchart wrote: On Wednesday 01 June 2011 16:03:06 Russell King - ARM Linux wrote: On Wed, Jun 01, 2011 at 03:50:50PM +0200, Laurent Pinchart wrote: In the

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-06 Thread Russell King - ARM Linux
On Mon, Jun 06, 2011 at 06:23:18PM +0200, Laurent Pinchart wrote: Hi Russell, On Friday 03 June 2011 08:32:12 Russell King - ARM Linux wrote: SG chaining has _nothing_ to do with hardware. It's all to do with software and hitting the SG table limit. What's the reason for limiting the

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-06 Thread Laurent Pinchart
Hi Russell, On Monday 06 June 2011 18:44:00 Russell King - ARM Linux wrote: On Mon, Jun 06, 2011 at 06:23:18PM +0200, Laurent Pinchart wrote: Hi Russell, On Friday 03 June 2011 08:32:12 Russell King - ARM Linux wrote: SG chaining has _nothing_ to do with hardware. It's all to do with

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-06 Thread Russell King - ARM Linux
On Mon, Jun 06, 2011 at 06:54:10PM +0200, Laurent Pinchart wrote: Of course not, but if the scatterlist is only touched by kernel code, it doesn't need to be contiguous in memory. It could be allocated with vmalloc(). Except vmalloc has a higher latency and a more restrictive API than other

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-03 Thread Russell King - ARM Linux
On Fri, Jun 03, 2011 at 02:12:47AM +0200, Laurent Pinchart wrote: Hi Russell, On Wednesday 01 June 2011 16:03:06 Russell King - ARM Linux wrote: On Wed, Jun 01, 2011 at 03:50:50PM +0200, Laurent Pinchart wrote: In the specific iovmm case, the driver uses the sglist API to build a list

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-03 Thread Felipe Contreras
On Fri, Jun 3, 2011 at 3:12 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Russell, On Wednesday 01 June 2011 16:03:06 Russell King - ARM Linux wrote: On Wed, Jun 01, 2011 at 03:50:50PM +0200, Laurent Pinchart wrote: In the specific iovmm case, the driver uses the sglist

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-02 Thread Laurent Pinchart
Hi Russell, On Wednesday 01 June 2011 16:03:06 Russell King - ARM Linux wrote: On Wed, Jun 01, 2011 at 03:50:50PM +0200, Laurent Pinchart wrote: In the specific iovmm case, the driver uses the sglist API to build a list of page-size sg entries, and then process it in software. Is that

[PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-01 Thread Laurent Pinchart
sg_alloc_table can only allocate multi-page scatter-gather list tables if the architecture supports scatter-gather lists chaining. ARM doesn't fit in that category. The IOMMU driver abuses the sg table structure only to hold page addresses without ever passing the table to the device. Use

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-01 Thread Russell King - ARM Linux
On Wed, Jun 01, 2011 at 03:30:11PM +0200, Laurent Pinchart wrote: sg_alloc_table can only allocate multi-page scatter-gather list tables if the architecture supports scatter-gather lists chaining. ARM doesn't fit in that category. Let's fix this properly, as I've said countless times and so

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-01 Thread Laurent Pinchart
Hi Russell, On Wednesday 01 June 2011 15:43:38 Russell King - ARM Linux wrote: On Wed, Jun 01, 2011 at 03:30:11PM +0200, Laurent Pinchart wrote: sg_alloc_table can only allocate multi-page scatter-gather list tables if the architecture supports scatter-gather lists chaining. ARM doesn't

Re: [PATCH v3 1/2] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU

2011-06-01 Thread Russell King - ARM Linux
On Wed, Jun 01, 2011 at 03:50:50PM +0200, Laurent Pinchart wrote: In the specific iovmm case, the driver uses the sglist API to build a list of page-size sg entries, and then process it in software. Is that considered as an abuse of the sglist API, or valid usage ? Anyway, sglist chaining