From 0a0161d173615bd5bd1192626cc6da723abd668a Mon Sep 17 00:00:00 2001
From: Laura Abbott <lauraa@codeaurora.org>
Date: Wed, 27 Mar 2013 13:58:43 -0700
Subject: [PATCH] Revert "cma: use MEMBLOCK_ALLOC_ANYWHERE for placing CMA
 regions"

This reverts commit 6308fd5399ae93e35ac381825a279996264a5f78.

As an optimization for kmap/kunmap, the page table entries may
not be completely removed on kunmap. This causes a problem
when memory is XPU protected and the CPU speculates into the
virtual address map. There are functions to remove zero
count entries for kmap calls but kmap_atomic is handled separately.
Remove CMA from highmem until an effective strategy for removing
these entries is found.

Change-Id: Ic60a34401244182442fc6d11dd0cdf986be7a335
CRs-Fixed: 467508
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
 drivers/base/dma-contiguous.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
index ebfe0043cb8d..9bdfa4551847 100644
--- a/drivers/base/dma-contiguous.c
+++ b/drivers/base/dma-contiguous.c
@@ -224,7 +224,7 @@ int __init cma_fdt_scan(unsigned long node, const char *uname,
 
 	pr_info("Found %s, memory base %lx, size %ld MiB\n", uname,
 		(unsigned long)base, (unsigned long)size / SZ_1M);
-	dma_contiguous_reserve_area(size, &base, MEMBLOCK_ALLOC_ANYWHERE, name);
+	dma_contiguous_reserve_area(size, &base, 0, name);
 
 	return 0;
 }
-- 
GitLab