Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca77a8f5 authored by Charan Teja Reddy's avatar Charan Teja Reddy
Browse files

mm: increase the count of dma_mmu_remap areas



Increase the count of mmu remap areas in dma_mmu_remap to provide the
space for the carveout region with fixup. Otherwise when configured
CMA areas touch MAX_CMA_AREAS, it results in undefined behaviour due to
last cma area encroaching into fixup area. This undefined behaviour is
because of the section mappings of the last cma, where we end up in 
using with out clearing it's PTE's.

Change-Id: Ibbb2557022e2b123338d80be317877c2dcf7b9f1
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 3afabc36
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -67,7 +67,10 @@ struct dma_contig_early_reserve {
	unsigned long size;
};

static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS];
/* allocate the memory for the fixup regions as well */
#define MAX_FIXUP_AREAS MAX_CMA_AREAS
static struct dma_contig_early_reserve
			dma_mmu_remap[MAX_CMA_AREAS + MAX_FIXUP_AREAS];
static int dma_mmu_remap_num;

void __init dma_contiguous_early_fixup(phys_addr_t base, unsigned long size)