lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 9 Aug 2015 17:12:38 +0800
From:	Feng Tang <feng.tang@...el.com>
To:	Michal Nazarewicz <mina86@...a86.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	John Stultz <john.stultz@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] staging: ion: Add a default struct device for cma heap

On Sat, Aug 08, 2015 at 12:39:48PM +0200, Michal Nazarewicz wrote:
> 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.

I'm not very familiar with the history of ion cma code, my guess is
there are quite a few Arch's are using ion/cma actually, but their
drivers are off mainline tree. 

Like currently, many android devices are using ion (checking the 
products on current market or reading code in Android AOSP code),
but the only ion platform driver sits in mainline is tegra_ion.c

And if a architecture doesn't use cma, then their ion platform
driver just simply does't set the "struct cma *"

Thanks,
Feng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ