Hello, On Tuesday, August 16, 2011 10:42 AM Laurent Pinchart wrote: > On Tuesday 16 August 2011 07:35:05 Marek Szyprowski wrote: > > On Friday, August 12, 2011 11:55 PM Laurent Pinchart wrote: > > > On Wednesday 10 August 2011 10:23:37 Marek Szyprowski wrote: > > > > From: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> > > > > > > > > Scatter-gather lib provides a helper functions to allocate scatter > > > > list, so there is no need to use vmalloc for it. sg_alloc_table() > > > > splits allocation into page size chunks and links them together into a > > > > chain. > > > > > > Last time I check ARM platforms didn't support SG list chaining. Has that > > > been fixed ? > > > > DMA-mapping code for ARM platform use for_each_sg() macro which has no > > problems with chained SG lists. > > for_each_sg() is fine, but sg_alloc_table() doesn't seem to be. > __sg_alloc_table(), called from sg_alloc_table(), starts with > > #ifndef ARCH_HAS_SG_CHAIN > BUG_ON(nents > max_ents); > #endif > > It also calls sg_chain() internally, which starts with > > #ifndef ARCH_HAS_SG_CHAIN > BUG(); > #endif > > ARCH_HAS_SG_CHAIN is defined on ARM if CONFIG_ARM_HAS_SG_CHAIN is set. That's > a boolean Kconfig option that is currently never set. Right, I wasn't aware of that, but it still doesn't look like an issue. The only client of dma-sg allocator is marvell-ccic, which is used on x86 systems. If one needs dma-sg allocator on ARM, he should follow the suggestion from the 74facffeca3795ffb5cf8898f5859fbb822e4c5d commit message. Best regards -- Marek Szyprowski Samsung Poland R&D Center -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html