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 <[EMAIL PROTECTED]>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to