All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 3/4 UPDATED] drivers: of: add initialization code for dma reserved memory
Date: Fri, 23 Aug 2013 13:27:11 -0600	[thread overview]
Message-ID: <5217B78F.1080300@wwwdotorg.org> (raw)
In-Reply-To: <1377247141-11284-1-git-send-email-m.szyprowski@samsung.com>

On 08/23/2013 02:39 AM,  wrote:
> From: Marek Szyprowski <m.szyprowski@samsung.com>
> 
> This patch adds device tree support for contiguous and reserved memory
> regions defined in device tree.
> 
> Large memory blocks can be reliably reserved only during early boot.
> This must happen before the whole memory management subsystem is
> initialized, because we need to ensure that the given contiguous blocks
> are not yet allocated by kernel. Also it must happen before kernel
> mappings for the whole low memory are created, to ensure that there will
> be no mappings (for reserved blocks) or mapping with special properties
> can be created (for CMA blocks). This all happens before device tree
> structures are unflattened, so we need to get reserved memory layout
> directly from fdt.
> 
> Later, those reserved memory regions are assigned to devices on each
> device structure initialization.

I think the binding looks OK now; just a couple minor comments below.

> diff --git a/Documentation/devicetree/bindings/memory.txt b/Documentation/devicetree/bindings/memory.txt

> +*** Reserved memory regions ***

> +compatible:	one or more of:
> +	- "linux,contiguous-memory-region" - enables binding of this
> +	  region to Contiguous Memory Allocator (special region for
> +	  contiguous memory allocations, shared with movable system
> +	  memory, Linux kernel-specific).
> +	- "reserved-memory-region" - compatibility is defined, given
> +	  region is assigned for exclusive usage for by the respective
> +	  devices.

I'm slightly hesitant to agree with "linux" in the name here, since it
seems like the concept of a memory region where DMA buffers/... should
be allocated is pretty OS-independant. Similar for:

> +linux,default-contiguous-region: property indicating that the region
> +	is the default region for all contiguous memory
> +	allocations, Linux specific (optional)

But, I guess there's nothing stopping any other OS from parsing this
same property, so I suppose it's OK. What do other DT maintainers think?

> +*** Example ***

> +		reserved-memory {
...
> +			contig_region at 0 {
...
> +			display_mem: region at 78000000 {
...
> +			multimedia_mem: region at 77000000 {

Nit: I think all 3 of those nodes should be called region, but it's
probably fine as-is.

So, the binding,
Acked-by: Stephen Warren <swarren@nvidia.com>

  parent reply	other threads:[~2013-08-23 19:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 15:04 [PATCH v6 0/4] Device Tree support for CMA (Contiguous Memory Allocator) Marek Szyprowski
2013-08-19 15:04 ` [PATCH v6 1/4] drivers: dma-contiguous: clean source code and prepare for device tree Marek Szyprowski
2013-08-19 15:04 ` [PATCH v6 2/4] drivers: of: add function to scan fdt nodes given by path Marek Szyprowski
2013-08-26 12:09   ` Rob Herring
2013-08-26 12:09     ` Rob Herring
2013-08-19 15:04 ` [PATCH v6 3/4] drivers: of: add initialization code for dma reserved memory Marek Szyprowski
2013-08-19 21:49   ` Stephen Warren
2013-08-19 22:02     ` Tomasz Figa
2013-08-19 22:17       ` Stephen Warren
2013-08-19 22:24         ` Tomasz Figa
2013-08-19 22:27           ` Stephen Warren
2013-08-19 22:40             ` Tomasz Figa
2013-08-19 22:54               ` Stephen Warren
2013-08-20 10:57         ` Marek Szyprowski
2013-08-20 16:35           ` Stephen Warren
2013-08-21 14:38             ` Marek Szyprowski
2013-08-22 20:08               ` Stephen Warren
2013-08-21 15:39             ` Tomasz Figa
2013-08-29 21:20               ` Grant Likely
2013-08-29 21:20                 ` Grant Likely
2013-08-29 21:12       ` Grant Likely
2013-08-29 21:12         ` Grant Likely
2013-08-21 15:56   ` Matt Sealey
     [not found]   ` <1377247141-11284-1-git-send-email-m.szyprowski@samsung.com>
2013-08-23 19:27     ` Stephen Warren [this message]
2013-08-26 12:20   ` Rob Herring
2013-08-26 12:20     ` Rob Herring
2013-08-19 15:04 ` [PATCH v6 4/4] ARM: init: add support for reserved memory defined by device tree 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=5217B78F.1080300@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.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.