Re: [Linaro-mm-sig] [PATCH][RFC] arm: dma-mapping: Add support for allocating/mapping cached buffers
Clark, Rob <rob <at> ti.com>
2012-07-14 13:53:48 GMT
On Fri, Jul 13, 2012 at 1:01 PM, Laura Abbott <lauraa <at> codeaurora.org> wrote:
> There are currently no dma allocation APIs that support cached
> buffers. For some use cases, caching provides a signficiant
> performance boost that beats write-combining regions. Add
> apis to allocate and map a cached DMA region.
btw, there were recent patches for allocating dma memory without a
virtual mapping. With this you could map however you want to
userspace (for example, cached)
I'm assuming that you are not needing it to be mapped cached to kernel?
BR,
-R
> Signed-off-by: Laura Abbott <lauraa <at> codeaurora.org>
> ---
> arch/arm/include/asm/dma-mapping.h | 21 +++++++++++++++++++++
> arch/arm/mm/dma-mapping.c | 21 +++++++++++++++++++++
> 2 files changed, 42 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
> index dc988ff..1565403 100644
> --- a/arch/arm/include/asm/dma-mapping.h
> +++ b/arch/arm/include/asm/dma-mapping.h
> <at> <at> -239,12 +239,33 <at> <at> int dma_mmap_coherent(struct device *, struct vm_area_struct *,
> extern void *dma_alloc_writecombine(struct device *, size_t, dma_addr_t *,
> gfp_t);
>
> +/**
(Continue reading)