aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-01-20 16:04:06 -0500
committerDoug Ledford <dledford@redhat.com>2017-01-24 12:23:35 -0500
commit7844572c633964c864d9f32dc3f2a8ffe5d70371 (patch)
treea0402ba054805b019692ba5a1e865f6849569957
parent1eec9e2befd35270b19a91bb633db595dc55975e (diff)
lib/dma-noop: Only build dma_noop_ops for s390 and m32r
Reduce the kernel size by only building dma_noop_ops for those architectures that actually use it. This was suggested by Christoph Hellwig. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Joerg Roedel <jroedel@suse.de> Cc: Andy Lutomirski <luto@kernel.org> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--arch/m32r/Kconfig1
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--lib/Kconfig5
-rw-r--r--lib/Makefile2
4 files changed, 8 insertions, 1 deletions
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index d227a6988d6b..95474460b367 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -18,6 +18,7 @@ config M32R
18 select MODULES_USE_ELF_RELA 18 select MODULES_USE_ELF_RELA
19 select HAVE_DEBUG_STACKOVERFLOW 19 select HAVE_DEBUG_STACKOVERFLOW
20 select CPU_NO_EFFICIENT_FFS 20 select CPU_NO_EFFICIENT_FFS
21 select DMA_NOOP_OPS
21 22
22config SBUS 23config SBUS
23 bool 24 bool
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index c6722112527d..38ad42358c41 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -137,6 +137,7 @@ config S390
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_DMA_CONTIGUOUS
140 select DMA_NOOP_OPS
140 select HAVE_DYNAMIC_FTRACE 141 select HAVE_DYNAMIC_FTRACE
141 select HAVE_DYNAMIC_FTRACE_WITH_REGS 142 select HAVE_DYNAMIC_FTRACE_WITH_REGS
142 select HAVE_EFFICIENT_UNALIGNED_ACCESS 143 select HAVE_EFFICIENT_UNALIGNED_ACCESS
diff --git a/lib/Kconfig b/lib/Kconfig
index 260a80e313b9..b6baf0609e8b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -395,6 +395,11 @@ config HAS_DMA
395 depends on !NO_DMA 395 depends on !NO_DMA
396 default y 396 default y
397 397
398config DMA_NOOP_OPS
399 bool
400 depends on HAS_DMA && (!64BIT || ARCH_DMA_ADDR_T_64BIT)
401 default n
402
398config CHECK_SIGNATURE 403config CHECK_SIGNATURE
399 bool 404 bool
400 405
diff --git a/lib/Makefile b/lib/Makefile
index bc4073a8cd08..ada06d5652e8 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -26,7 +26,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
26 26
27lib-$(CONFIG_MMU) += ioremap.o 27lib-$(CONFIG_MMU) += ioremap.o
28lib-$(CONFIG_SMP) += cpumask.o 28lib-$(CONFIG_SMP) += cpumask.o
29lib-$(CONFIG_HAS_DMA) += dma-noop.o 29lib-$(CONFIG_DMA_NOOP_OPS) += dma-noop.o
30 30
31lib-y += kobject.o klist.o 31lib-y += kobject.o klist.o
32obj-y += lockref.o 32obj-y += lockref.o