All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
To: Michal Nazarewicz <mina86@mina86.com>,
	Ralf Baechle <ralf@linux-mips.org>, <gregkh@linuxfoundation.org>,
	<m.szyprowski@samsung.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-mips@linux-mips.org>
Subject: Re: [PATCH 4/4] mips: dma: Add cma support
Date: Thu, 17 Jul 2014 10:17:36 +0100	[thread overview]
Message-ID: <53C794B0.4060504@imgtec.com> (raw)
In-Reply-To: <xa1t7g3db6mu.fsf@mina86.com>



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

WARNING: multiple messages have this Message-ID (diff)
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
To: Michal Nazarewicz <mina86@mina86.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	gregkh@linuxfoundation.org, m.szyprowski@samsung.com
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH 4/4] mips: dma: Add cma support
Date: Thu, 17 Jul 2014 10:17:36 +0100	[thread overview]
Message-ID: <53C794B0.4060504@imgtec.com> (raw)
Message-ID: <20140717091736.EPt1yLjZOvD53AWQAvLafDIUZz3Jo5kmRil5GhyXFiU@z> (raw)
In-Reply-To: <xa1t7g3db6mu.fsf@mina86.com>



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

  reply	other threads:[~2014-07-17  9:17 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 15:51 [PATCH 0/4] mips: Add cma support to mips Zubair Lutfullah Kakakhel
2014-07-16 15:51 ` Zubair Lutfullah Kakakhel
2014-07-16 15:51 ` Zubair Lutfullah Kakakhel
2014-07-16 15:51 ` [PATCH 1/4] asm-generic: Add dma-contiguous.h Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 15:59   ` Will Deacon
2014-07-16 15:59     ` Will Deacon
2014-07-16 16:20   ` Michal Nazarewicz
2014-07-16 16:20     ` Michal Nazarewicz
2014-07-16 15:51 ` [PATCH 2/4] arm64: use generic dma-contiguous.h Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 16:20   ` Michal Nazarewicz
2014-07-16 16:20     ` Michal Nazarewicz
2014-07-17 10:23   ` Catalin Marinas
2014-07-17 10:23     ` Catalin Marinas
2014-07-16 15:51 ` [PATCH 3/4] x86: " Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 16:20   ` Michal Nazarewicz
2014-07-16 16:20     ` Michal Nazarewicz
2014-07-17  9:02     ` Zubair Lutfullah Kakakhel
2014-07-17  9:02       ` Zubair Lutfullah Kakakhel
2014-07-17  9:02       ` Zubair Lutfullah Kakakhel
2014-07-16 15:51 ` [PATCH 4/4] mips: dma: Add cma support Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 15:51   ` Zubair Lutfullah Kakakhel
2014-07-16 16:39   ` Michal Nazarewicz
2014-07-16 16:39     ` Michal Nazarewicz
2014-07-17  9:17     ` Zubair Lutfullah Kakakhel [this message]
2014-07-17  9:17       ` Zubair Lutfullah Kakakhel
2014-07-16 16:18 ` [PATCH 0/4] mips: Add cma support to mips Manuel Lauss
2014-07-16 16:18   ` Manuel Lauss
2014-07-17  8:38   ` Manuel Lauss
2014-07-17  8:41     ` Zubair Lutfullah Kakakhel
2014-07-17  8:41       ` Zubair Lutfullah Kakakhel
2014-07-17 12:31 ` Marek Szyprowski
2014-07-17 12:31   ` Marek Szyprowski

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=53C794B0.4060504@imgtec.com \
    --to=zubair.kakakhel@imgtec.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=ralf@linux-mips.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.