[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150805104627.GB27241@shbuild888>
Date: Wed, 5 Aug 2015 18:46:27 +0800
From: Feng Tang <feng.tang@...el.com>
To: Michal Nazarewicz <mina86@...a86.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
"kyungmin.park@...sung.com" <kyungmin.park@...sung.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
"john.stultz@...aro.org" <john.stultz@...aro.org>
Subject: Re: [PATCH] CMA: Don't return a valid cma for non-cma dev
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@...gle.com>--<xmpp:mina86@...ber.org>--ooO--(_)--Ooo--
--
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