s390: add cma support
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 14 Nov 2016 12:57:03 +0000 (13:57 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 23 Nov 2016 15:02:23 +0000 (16:02 +0100)
In order to make the cma infrastructure usable we need to add a small
architecture backend which calls dma_contiguous_reserve.
Otherwise we would end up with the cma allocator enabled, but no pool
where memory can be allocated from.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Kconfig
arch/s390/include/asm/Kbuild
arch/s390/kernel/setup.c

index a159dfc27b76675af295eb0d22ce35e3e6b62499..2d05efa31df34ef7d47775ca3c52ba1618cd323a 100644 (file)
@@ -136,6 +136,7 @@ config S390
        select HAVE_CMPXCHG_LOCAL
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_API_DEBUG
+       select HAVE_DMA_CONTIGUOUS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
index 20f196b82a6e65ad9f792d5d885df27441aeddaa..24cb7452bbe71b9529759a61a00b4dba6f0a2388 100644 (file)
@@ -1,6 +1,5 @@
-
-
 generic-y += clkdev.h
+generic-y += dma-contiguous.h
 generic-y += export.h
 generic-y += irq_work.h
 generic-y += mcs_spinlock.h
index b75da681d4c5f9bb0c608b1bc0416c6af78dacb8..17160fb437777a652dde011c59d800d40889c67b 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/root_dev.h>
 #include <linux/console.h>
 #include <linux/kernel_stat.h>
+#include <linux/dma-contiguous.h>
 #include <linux/device.h>
 #include <linux/notifier.h>
 #include <linux/pfn.h>
@@ -903,6 +904,7 @@ void __init setup_arch(char **cmdline_p)
 
        setup_memory_end();
        setup_memory();
+       dma_contiguous_reserve(memory_end);
 
        check_initrd();
        reserve_crashkernel();