All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [PATCH] [1/3] Make all drivers that use dma_declare_coherent_memory depend on it
Date: Fri, 22 Feb 2008 15:23:28 +0100 (CET)	[thread overview]
Message-ID: <20080222323.714291012@suse.de> (raw)


There are two users of dma_declare_coherent_memory in tree. Make them 
dependent on the architectures who actually implement that instead of 
falling at runtime. All cases I checked fail fataly (no recovery)
so these drivers will never work on these architectures.

I'm also a little puzzled why x86-64 allyesconfig worked with CONFIG_MFD_SM501
without this patch anyways. 

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/arch/cris/Kconfig
===================================================================
--- linux.orig/arch/cris/Kconfig
+++ linux/arch/cris/Kconfig
@@ -47,6 +47,11 @@ config GENERIC_CALIBRATE_DELAY
 config NO_IOPORT
 	def_bool y
 
+config HAS_DMA_DECLARE_COHERENT
+	# looks weird, but it really depends on that
+	depends on ETRAX_CARDBUS
+	def_bool y
+
 config FORCE_MAX_ZONEORDER
 	int
 	default 6
Index: linux/arch/sh/Kconfig
===================================================================
--- linux.orig/arch/sh/Kconfig
+++ linux/arch/sh/Kconfig
@@ -90,6 +90,9 @@ config ARCH_HAS_ILOG2_U64
 config ARCH_NO_VIRT_TO_BUS
 	def_bool y
 
+config HAS_DMA_DECLARE_COHERENT
+	def_boot y
+
 config ARCH_SUPPORTS_AOUT
 	def_bool y
 
Index: linux/arch/x86/Kconfig
===================================================================
--- linux.orig/arch/x86/Kconfig
+++ linux/arch/x86/Kconfig
@@ -157,6 +157,10 @@ config GENERIC_PENDING_IRQ
 	depends on GENERIC_HARDIRQS && SMP
 	default y
 
+config HAS_DMA_DECLARE_COHERENT
+	def_bool y
+	depends on X86_32
+
 config X86_SMP
 	bool
 	depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64)
Index: linux/drivers/mfd/Kconfig
===================================================================
--- linux.orig/drivers/mfd/Kconfig
+++ linux/drivers/mfd/Kconfig
@@ -7,6 +7,7 @@ menu "Multifunction device drivers"
 
 config MFD_SM501
 	tristate "Support for Silicon Motion SM501"
+	depends on HAS_DMA_DECLARE_COHERENT
 	 ---help---
 	  This is the core driver for the Silicon Motion SM501 multimedia
 	  companion chip. This device is a multifunction device which may
Index: linux/drivers/scsi/Kconfig
===================================================================
--- linux.orig/drivers/scsi/Kconfig
+++ linux/drivers/scsi/Kconfig
@@ -1163,7 +1163,7 @@ config SCSI_ZALON
 
 config SCSI_NCR_Q720
 	tristate "NCR Quad 720 MCA SCSI support"
-	depends on MCA && SCSI
+	depends on MCA && SCSI && HAS_DMA_DECLARE_COHERENT
 	select SCSI_SPI_ATTRS
 	help
 	  This is a driver for the MicroChannel Quad 720 card produced by

             reply	other threads:[~2008-02-22 14:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 14:23 Andi Kleen [this message]
2008-02-22 14:23 ` [PATCH] [2/3] Remove dma_declare_coherent_memory etc. from cris Andi Kleen
2008-02-22 14:23 ` [PATCH] [3/3] Remove dmam_{declare,release}_coherent_memory Andi Kleen

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=20080222323.714291012@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.