x86-32: Introduce CONFIG_X86_DEV_DMA_OPS
authorAlessandro Rubini <rubini@gnudd.com>
Wed, 4 Apr 2012 17:39:58 +0000 (19:39 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 12 Apr 2012 18:09:56 +0000 (11:09 -0700)
32-bit x86 systems may need their own DMA operations, so add
a new config option, which is turned on for 64-bit systems. This
patch has no functional effect but it paves the way for supporting
the STA2x11 I/O Hub and possibly other chips.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Link: http://lkml.kernel.org/r/f79fcc1a2e17ef942e1b798b92aac43a80202532.1333560789.git.rubini@gnudd.com
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/Kconfig
arch/x86/include/asm/device.h
arch/x86/include/asm/dma-mapping.h

index 1d14cc6b79ad399d1ad293030c9f2271d9e5df1d..07b412aed38b9fd34a447f04d302429740430410 100644 (file)
@@ -12,6 +12,7 @@ config X86_32
 
 config X86_64
        def_bool 64BIT
+       select X86_DEV_DMA_OPS
 
 ### Arch settings
 config X86
@@ -2215,6 +2216,10 @@ config HAVE_TEXT_POKE_SMP
        bool
        select STOP_MACHINE if SMP
 
+config X86_DEV_DMA_OPS
+       bool
+       depends on X86_64
+
 source "net/Kconfig"
 
 source "drivers/Kconfig"
index 63a2a03d7d516947eb945a856a988cb8284b8dcd..93e1c55f14ab42503be641ed305eb6863f52a200 100644 (file)
@@ -5,8 +5,8 @@ struct dev_archdata {
 #ifdef CONFIG_ACPI
        void    *acpi_handle;
 #endif
-#ifdef CONFIG_X86_64
-struct dma_map_ops *dma_ops;
+#ifdef CONFIG_X86_DEV_DMA_OPS
+       struct dma_map_ops *dma_ops;
 #endif
 #if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
        void *iommu; /* hook for IOMMU specific extension */
index 4b4331d71935c7cf0d477e1c3a06b93072e4b463..09aa473e291749c77675b0ec6c4e7054a6dba7c7 100644 (file)
@@ -30,7 +30,7 @@ extern struct dma_map_ops *dma_ops;
 
 static inline struct dma_map_ops *get_dma_ops(struct device *dev)
 {
-#ifdef CONFIG_X86_32
+#ifndef CONFIG_X86_DEV_DMA_OPS
        return dma_ops;
 #else
        if (unlikely(!dev) || !dev->archdata.dma_ops)
This page took 0.029183 seconds and 5 git commands to generate.