lkml.org 
[lkml]   [2015]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] staging: ion: Add a default struct device for cma heap
Date
On Fri, Aug 07 2015, Feng Tang wrote:
> For ion cma heap, the buffer allocation func ion_cma_allocate() will
> call dma_alloc_coherent(dev, ...). And dma_alloc_coherent() is
> implemented by each architeture(arm/m68k/x86 etc), and many Arch's
> implementation doesn't use cma, but use alloc_pages() like APIs.

So what you’re saying is that ‘ION CMA heap’ is a misnomer since it has
to do with CMA only if given architecture implements dma_alloc_coherent
using CMA. It should rather be called ‘ION DMA coherent heap’.

This leads to realisation that the code should be oblivious to CMA areas
and never operate on them directly (e.g. never accept struct cma * or
use dev_set_cma_area). In the current form, if architecture does not
use CMA, the whole dev_set_cma_area shenanigans are pointless.

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--


\
 
 \ /
  Last update: 2015-08-08 13:01    [W:0.179 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site