All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: ggdavisiv@gmail.com, akpm@linux-foundation.org,
	aneesh.kumar@linux.vnet.ibm.com, george_davis@mentor.com,
	gregkh@linuxfoundation.org, iamjoonsoo.kim@lge.com,
	laurent.pinchart+renesas@ideasonboard.com,
	m.szyprowski@samsung.com, mina86@mina86.com,
	torvalds@linux-foundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "mm: cma: fix totalcma_pages to include DT defined CMA regions" has been added to the 3.18-stable tree
Date: Thu, 31 Aug 2017 07:57:32 +0200	[thread overview]
Message-ID: <150415905243112@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    mm: cma: fix totalcma_pages to include DT defined CMA regions

to the 3.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-cma-fix-totalcma_pages-to-include-dt-defined-cma-regions.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 94737a85f332aee75255960eaa16e89ddfa4c75a Mon Sep 17 00:00:00 2001
From: "George G. Davis" <ggdavisiv@gmail.com>
Date: Wed, 11 Feb 2015 15:26:27 -0800
Subject: mm: cma: fix totalcma_pages to include DT defined CMA regions

From: George G. Davis <ggdavisiv@gmail.com>

commit 94737a85f332aee75255960eaa16e89ddfa4c75a upstream.

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>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/cma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/cma.c
+++ b/mm/cma.c
@@ -200,6 +200,7 @@ int __init cma_init_reserved_mem(phys_ad
 	cma->order_per_bit = order_per_bit;
 	*res_cma = cma;
 	cma_area_count++;
+	totalcma_pages += (size / PAGE_SIZE);
 
 	return 0;
 }
@@ -338,7 +339,6 @@ int __init cma_declare_contiguous(phys_a
 	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;


Patches currently in stable-queue which might be from ggdavisiv@gmail.com are

queue-3.18/mm-cma-fix-totalcma_pages-to-include-dt-defined-cma-regions.patch

                 reply	other threads:[~2017-08-31  5:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=150415905243112@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --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=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.