lkml.org 
[lkml]   [2014]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] mips: dma: Add cma support


On 16/07/14 17:39, Michal Nazarewicz wrote:
> On Wed, Jul 16 2014, Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> wrote:
>> Adds cma support to the mips architecture.
>>
>> cma uses memblock. However, mips uses bootmem.
>
> Does cma_early_percent_memory work correctly then?
>

Yes it does. All memblock functions work. And this is before bootmem
is informed.

>> bootmem is informed about any regions reserved by memblock
>
> Alternatively maybe it would make sense to create a new definition of
> dma_contiguous_reserve_area that uses bootmem and choose it based on
> some CONFIG_CMA_USE_BOOTMEM which would be selected by MIPS.
>

Telling bootmem takes only 3 lines.

Adding CONFIG_CMA_USE_BOOTMEM would add more functions and maintenance overhead.
And it will basically do the same thing.
Reserve memory. And tell the bootmem allocator.

>> dma api is modified to use cma reserved memory regions when available
>>
>> Tested using cma_test. cma_test is a simple driver that assigns blocks
>> of memory from cma reserved sections.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>
> Acked-by: Michal Nazarewicz <mina86@mina86.com>

Thank-you

ZubairLK


\
 
 \ /
  Last update: 2014-07-17 12:02    [W:0.087 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site