aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-06-13 13:41:20 +0100
committerMark Brown <broonie@kernel.org>2015-01-22 21:27:23 +0000
commit432d182423d53bc7f03d3a399cd57482c5ca47b0 (patch)
tree22dfbd1a6730e757c15704a90f28a527ee454e8d
parent83f1bff42dfdbf3f4bc70a07f4304db54f89d27d (diff)
downloadlinux-linaro-stable-432d182423d53bc7f03d3a399cd57482c5ca47b0.tar.gz
arm64: Limit the CMA buffer to 32-bit if ZONE_DMA
When the CMA buffer is allocated, it is too early to know whether devices will require ZONE_DMA memory. This patch limits the CMA buffer to (DMA_BIT_MASK(32) + 1) if CONFIG_ZONE_DMA is enabled. In addition, it computes the dma_to_phys(DMA_BIT_MASK(32)) before the increment (no current functional change). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> (cherry picked from commit 2d5a5612bceda8edd25b29f363c4e2c6cda28bab) Signed-off-by: Mark Brown <broonie@kernel.org> Conflicts: arch/arm64/mm/init.c
-rw-r--r--arch/arm64/mm/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index 6757d02d6976..d0f86b74fce6 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -144,6 +144,7 @@ static void arm64_memory_present(void)
void __init arm64_memblock_init(void)
{
u64 *reserve_map, base, size;
+ phys_addr_t dma_phys_limit = 0;
/*
* Register the kernel text, kernel data, initrd, and initial