summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/mm
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-01-14 10:05:24 +0100
committerMichal Simek <michal.simek@xilinx.com>2020-02-04 11:38:59 +0100
commit2602276d3d3811b1a48c48113042cd75fcbfc27d (patch)
treefb0f41091be5c56b4aba8dec76ee7d1d399cd1d5 /arch/microblaze/mm
parentdef3f7cefe4e81c296090e1722a76551142c227c (diff)
downloadlinux-2602276d3d3811b1a48c48113042cd75fcbfc27d.tar.bz2
microblaze: Wire CMA allocator
Based on commit 04e3543e228f ("microblaze: use the generic dma coherent remap allocator") CMA can be easily enabled by calling dma_contiguous_reserve() at the end of mmu_init(). High limit is end of lowmem space which is completely unused at this point of time. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'arch/microblaze/mm')
-rw-r--r--arch/microblaze/mm/init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 050fc621c920..1056f1674065 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -7,6 +7,7 @@
* for more details.
*/
+#include <linux/dma-contiguous.h>
#include <linux/memblock.h>
#include <linux/init.h>
#include <linux/kernel.h>
@@ -345,6 +346,9 @@ asmlinkage void __init mmu_init(void)
/* This will also cause that unflatten device tree will be allocated
* inside 768MB limit */
memblock_set_current_limit(memory_start + lowmem_size - 1);
+
+ /* CMA initialization */
+ dma_contiguous_reserve(memory_start + lowmem_size - 1);
}
/* This is only called until mem_init is done. */