aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-11-14 07:57:03 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-11-23 10:02:23 -0500
commite1231b0e487caea77d3dffeb737cb25bd3595c5b (patch)
tree0e42dd4c92929b186345975d3a91ff25c3a24153
parent1e16b09666baaf2919f991064237961ca766e394 (diff)
s390: add cma support
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>
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/include/asm/Kbuild3
-rw-r--r--arch/s390/kernel/setup.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index a159dfc27b76..2d05efa31df3 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -136,6 +136,7 @@ config S390
136 select HAVE_CMPXCHG_LOCAL 136 select HAVE_CMPXCHG_LOCAL
137 select HAVE_DEBUG_KMEMLEAK 137 select HAVE_DEBUG_KMEMLEAK
138 select HAVE_DMA_API_DEBUG 138 select HAVE_DMA_API_DEBUG
139 select HAVE_DMA_CONTIGUOUS
139 select HAVE_DYNAMIC_FTRACE 140 select HAVE_DYNAMIC_FTRACE
140 select HAVE_DYNAMIC_FTRACE_WITH_REGS 141 select HAVE_DYNAMIC_FTRACE_WITH_REGS
141 select HAVE_EFFICIENT_UNALIGNED_ACCESS 142 select HAVE_EFFICIENT_UNALIGNED_ACCESS
diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild
index 20f196b82a6e..24cb7452bbe7 100644
--- a/arch/s390/include/asm/Kbuild
+++ b/arch/s390/include/asm/Kbuild
@@ -1,6 +1,5 @@
1
2
3generic-y += clkdev.h 1generic-y += clkdev.h
2generic-y += dma-contiguous.h
4generic-y += export.h 3generic-y += export.h
5generic-y += irq_work.h 4generic-y += irq_work.h
6generic-y += mcs_spinlock.h 5generic-y += mcs_spinlock.h
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index b75da681d4c5..17160fb43777 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -35,6 +35,7 @@
35#include <linux/root_dev.h> 35#include <linux/root_dev.h>
36#include <linux/console.h> 36#include <linux/console.h>
37#include <linux/kernel_stat.h> 37#include <linux/kernel_stat.h>
38#include <linux/dma-contiguous.h>
38#include <linux/device.h> 39#include <linux/device.h>
39#include <linux/notifier.h> 40#include <linux/notifier.h>
40#include <linux/pfn.h> 41#include <linux/pfn.h>
@@ -903,6 +904,7 @@ void __init setup_arch(char **cmdline_p)
903 904
904 setup_memory_end(); 905 setup_memory_end();
905 setup_memory(); 906 setup_memory();
907 dma_contiguous_reserve(memory_end);
906 908
907 check_initrd(); 909 check_initrd();
908 reserve_crashkernel(); 910 reserve_crashkernel();