]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
lib/dma-noop: Only build dma_noop_ops for s390 and m32r
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 20 Jan 2017 21:04:06 +0000 (13:04 -0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 17:23:35 +0000 (12:23 -0500)
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>
arch/m32r/Kconfig
arch/s390/Kconfig
lib/Kconfig
lib/Makefile

index d227a6988d6b14b0bb3119d43ef4ed553fd231d3..95474460b367208a0dc327b1bf120af0eca2816c 100644 (file)
@@ -18,6 +18,7 @@ config M32R
        select MODULES_USE_ELF_RELA
        select HAVE_DEBUG_STACKOVERFLOW
        select CPU_NO_EFFICIENT_FFS
+       select DMA_NOOP_OPS
 
 config SBUS
        bool
index c6722112527d6ed5937bd98870dbb8fb843b3dd1..38ad42358c41edca78d251005ea1e2015fcc138e 100644 (file)
@@ -137,6 +137,7 @@ config S390
        select HAVE_DEBUG_KMEMLEAK
        select HAVE_DMA_API_DEBUG
        select HAVE_DMA_CONTIGUOUS
+       select DMA_NOOP_OPS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_DYNAMIC_FTRACE_WITH_REGS
        select HAVE_EFFICIENT_UNALIGNED_ACCESS
index 260a80e313b9022a711f77a8531feb5f864fa91c..b6baf0609e8b2b661d1c926f9b9f6b0144765243 100644 (file)
@@ -395,6 +395,11 @@ config HAS_DMA
        depends on !NO_DMA
        default y
 
+config DMA_NOOP_OPS
+       bool
+       depends on HAS_DMA && (!64BIT || ARCH_DMA_ADDR_T_64BIT)
+       default n
+
 config CHECK_SIGNATURE
        bool
 
index bc4073a8cd08da8377053c54a09e61f753a3fc7b..ada06d5652e8ce54c00cde878338ef9989fef320 100644 (file)
@@ -26,7 +26,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
 
 lib-$(CONFIG_MMU) += ioremap.o
 lib-$(CONFIG_SMP) += cpumask.o
-lib-$(CONFIG_HAS_DMA) += dma-noop.o
+lib-$(CONFIG_DMA_NOOP_OPS) += dma-noop.o
 
 lib-y  += kobject.o klist.o
 obj-y  += lockref.o