From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
"John W. Linville" <linville@tuxdriver.com>
Cc: Kyle McMartin <kyle@parisc-linux.org>,
linux-kernel@vger.kernel.org, James.Bottomley@SteelEye.com,
Tejun Heo <htejun@gmail.com>, Jeff Garzik <jeff@garzik.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
geert@linux-m68k.org, zippel@linux-m68k.org, spyro@f2s.com,
uclinux-v850@lsi.nec.co.jp, ysato@users.sourceforge.jp
Subject: [patch] Introduce CONFIG_HAS_DMA.
Date: Mon, 26 Feb 2007 14:57:43 +0100 [thread overview]
Message-ID: <20070226135743.GB7925@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20070223143938.GA5815@tuxdriver.com>
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Architectures that don't support DMA can say so by adding a
config NO_DMA to their Kconfig file. This will prevent compilation
of some dma specific driver code. Also dma-mapping-broken.h isn't
needed anymore on at least s390.
This avoids compilation and linking of otherwise dead/broken code.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
Other architectures that include dma-mapping-broken.h are
arm26, h8300, m68k, m68knommu and v850. If these could be converted
as well we could get rid of the header file.
arch/s390/Kconfig | 3 +++
drivers/base/Makefile | 4 ++--
include/asm-s390/dma-mapping.h | 2 --
lib/Kconfig | 5 +++++
4 files changed, 10 insertions(+), 4 deletions(-)
Index: linux-2.6/arch/s390/Kconfig
===================================================================
--- linux-2.6.orig/arch/s390/Kconfig
+++ linux-2.6/arch/s390/Kconfig
@@ -44,6 +44,9 @@ config GENERIC_TIME
config NO_IOMEM
def_bool y
+config NO_DMA
+ def_bool y
+
mainmenu "Linux Kernel Configuration"
config S390
Index: linux-2.6/drivers/base/Makefile
===================================================================
--- linux-2.6.orig/drivers/base/Makefile
+++ linux-2.6/drivers/base/Makefile
@@ -2,10 +2,10 @@
obj-y := core.o sys.o bus.o dd.o \
driver.o class.o platform.o \
- cpu.o firmware.o init.o map.o dmapool.o \
- dma-mapping.o devres.o \
+ cpu.o firmware.o init.o map.o devres.o \
attribute_container.o transport_class.o
obj-y += power/
+obj-$(CONFIG_HAS_DMA) += dma-mapping.o dmapool.o
obj-$(CONFIG_ISA) += isa.o
obj-$(CONFIG_FW_LOADER) += firmware_class.o
obj-$(CONFIG_NUMA) += node.o
Index: linux-2.6/include/asm-s390/dma-mapping.h
===================================================================
--- linux-2.6.orig/include/asm-s390/dma-mapping.h
+++ linux-2.6/include/asm-s390/dma-mapping.h
@@ -9,6 +9,4 @@
#ifndef _ASM_DMA_MAPPING_H
#define _ASM_DMA_MAPPING_H
-#include <asm-generic/dma-mapping-broken.h>
-
#endif /* _ASM_DMA_MAPPING_H */
Index: linux-2.6/lib/Kconfig
===================================================================
--- linux-2.6.orig/lib/Kconfig
+++ linux-2.6/lib/Kconfig
@@ -111,4 +111,9 @@ config HAS_IOPORT
depends on HAS_IOMEM && !NO_IOPORT
default y
+config HAS_DMA
+ boolean
+ depends on !NO_DMA
+ default y
+
endmenu
--
Heiko Carstens
Linux on System z Development
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen
Geschaeftsfuehrung : Herbert Kircher
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
next prev parent reply other threads:[~2007-02-26 13:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 0:59 [PATCH] dma-mapping-broken.h: flesh-out DMA API stubs John W. Linville
2007-02-23 3:42 ` Heiko Carstens
2007-02-23 6:13 ` Heiko Carstens
2007-02-23 9:50 ` Heiko Carstens
2007-02-23 13:57 ` Kyle McMartin
2007-02-23 14:39 ` John W. Linville
2007-02-26 13:57 ` Heiko Carstens [this message]
2007-05-25 16:36 ` [patch] Introduce CONFIG_HAS_DMA Dan Williams
2007-05-30 9:10 ` Cornelia Huck
2007-05-30 21:40 ` Williams, Dan J
2007-05-30 22:29 ` [PATCH] dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs Dan Williams
2007-05-31 6:53 ` [patch] Introduce CONFIG_HAS_DMA Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070226135743.GB7925@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=kyle@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=schwidefsky@de.ibm.com \
--cc=spyro@f2s.com \
--cc=uclinux-v850@lsi.nec.co.jp \
--cc=ysato@users.sourceforge.jp \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®