Quantcast
Channel: Serverphorums.com
Viewing all articles
Browse latest Browse all 23908

Re: [PATCH v2] staging: ion: Add a default struct device for cma heap

$
0
0
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--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Viewing all articles
Browse latest Browse all 23908

Trending Articles