Re: [RFC][PATCH] adddma_reserve_coherent_memory()/dma_free_reserved_memory() API

From: FUJITA Tomonori
Date: Fri Aug 20 2010 - 03:18:13 EST


On Thu, 19 Aug 2010 18:18:35 +0300
Marin Mitov <mitov@xxxxxxxxxxx> wrote:

> struct device contains a member: struct dma_coherent_mem *dma_mem;
> to hold information for a piece of memory declared dma-coherent.
> Alternatively the same member could also be used to hold preallocated
> dma-coherent memory for latter per-device use.

I think that drivers/base/dma-coherent.c is for architectures to
implement dma_alloc_coherent(). So using it for drivers doesn't look
correct.


> This tric is already used in drivers/staging/dt3155v4l.c
> dt3155_alloc_coherent()/dt3155_free_coherent()
>
> Here proposed for general use by popular demand from video4linux folks.
> Helps for videobuf-dma-contig framework.

What you guys exactly want to do? If you just want to pre-allocate
coherent memory for latter usage, why dma_pool API (mm/dmapool.c)
doesn't work?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/