From: Feng Tang <feng.tang@intel.com>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
"kyungmin.park@samsung.com" <kyungmin.park@samsung.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"iamjoonsoo.kim@lge.com" <iamjoonsoo.kim@lge.com>,
"john.stultz@linaro.org" <john.stultz@linaro.org>
Subject: Re: [PATCH] CMA: Don't return a valid cma for non-cma dev
Date: Wed, 5 Aug 2015 18:46:27 +0800 [thread overview]
Message-ID: <20150805104627.GB27241@shbuild888> (raw)
In-Reply-To: <xa1tlhdqc9n0.fsf@mina86.com>
On Wed, Aug 05, 2015 at 12:28:03PM +0200, Michal Nazarewicz wrote:
> On Wed, Aug 05 2015, Feng Tang wrote:
> > that for a system which needs multiple cma heaps (like for security
> > reason), they may have to share one struct device *dev, as in
> > ion_cma_heap_create()
>
> If you need several CMA areas to allocate from, create multiple struct
> devices.
Yes, that's my thought too. The normal cma case for SOCs are one platform
device is created in drivers/staging/android/ion/xxx_ion.c, then that
device's pointer will be transferred into ion_cma_heap_create() inside
of the struct ion_platform_heap data.
And it's not easy to create multiple platform devices. And it may be
better to give each cma_heap one dedicated device in struct ion_cma_heap
which could be used as a parameter for
dma_alloc_from_contigous() --> cma_alloc()
Thanks,
Feng
> --
> 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--
next prev parent reply other threads:[~2015-08-05 10:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 2:37 [PATCH] CMA: Don't return a valid cma for non-cma dev Feng Tang
2015-07-30 13:59 ` Michal Nazarewicz
2015-07-31 2:51 ` Tang, Feng
2015-07-31 12:05 ` Michal Nazarewicz
2015-07-31 15:18 ` Feng Tang
2015-07-31 17:46 ` Michal Nazarewicz
2015-08-05 9:19 ` Feng Tang
2015-08-05 10:28 ` Michal Nazarewicz
2015-08-05 10:46 ` Feng Tang [this message]
2015-08-05 10:55 ` Feng Tang
2015-08-05 11:15 ` Michal Nazarewicz
2015-08-05 13:22 ` Feng Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150805104627.GB27241@shbuild888 \
--to=feng.tang@intel.com \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=john.stultz@linaro.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mina86@mina86.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox