mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: "George G. Davis" <ggdavisiv@gmail.com>, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	"George G. Davis" <george_davis@mentor.com>
Subject: Re: [PATCH] mm: cma: Fix totalcma_pages to include DT defined CMA regions
Date: Fri, 09 Jan 2015 16:58:41 +0100	[thread overview]
Message-ID: <xa1t4ms0kksu.fsf@mina86.com> (raw)
In-Reply-To: <1420812065-129868-1-git-send-email-george_davis@mentor.com>

On Fri, Jan 09 2015, "George G. Davis" <ggdavisiv@gmail.com> wrote:
> The totalcma_pages variable is not updated to account for CMA regions
> defined via device tree reserved-memory sub-nodes.  Fix this omission by
> moving the calculation of totalcma_pages into cma_init_reserved_mem()
> instead of cma_declare_contiguous() such that it will include reserved
> memory used by all CMA regions.
>
> Signed-off-by: George G. Davis <george_davis@mentor.com>

Acked-by: Michal Nazarewicz <mina86@mina86.com>

> ---
>  mm/cma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index a85ae28..75016fd 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -199,6 +199,7 @@ int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
>  	cma->order_per_bit = order_per_bit;
>  	*res_cma = cma;
>  	cma_area_count++;
> +	totalcma_pages += (size / PAGE_SIZE);
>  
>  	return 0;
>  }
> @@ -337,7 +338,6 @@ int __init cma_declare_contiguous(phys_addr_t base,
>  	if (ret)
>  		goto err;
>  
> -	totalcma_pages += (size / PAGE_SIZE);
>  	pr_info("Reserved %ld MiB at %pa\n", (unsigned long)size / SZ_1M,
>  		&base);
>  	return 0;
> -- 
> 1.9.3
>

-- 
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--

      reply	other threads:[~2015-01-09 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 14:01 George G. Davis
2015-01-09 15:58 ` Michal Nazarewicz [this message]

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=xa1t4ms0kksu.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=george_davis@mentor.com \
    --cc=ggdavisiv@gmail.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.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

Powered by JetHome