From: Glauber Costa Date: Tue, 25 Mar 2008 21:36:36 +0000 (-0300) Subject: x86: provide a bad_dma_address symbol for i386 X-Git-Tag: v2.6.26-rc1~1133^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c18341665917b493fa40eeb3c7ff6c1a5ac47db;p=linux-2.6 x86: provide a bad_dma_address symbol for i386 It's initially 0, since we don't expect any DMA there. Signed-off-by: Glauber Costa Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/pci-dma_32.c b/arch/x86/kernel/pci-dma_32.c index 453b4bda27..55ab3c874d 100644 --- a/arch/x86/kernel/pci-dma_32.c +++ b/arch/x86/kernel/pci-dma_32.c @@ -14,6 +14,10 @@ #include #include +/* For i386, we make it point to the NULL address */ +dma_addr_t bad_dma_address __read_mostly = 0x0; +EXPORT_SYMBOL(bad_dma_address); + struct dma_coherent_mem { void *virt_base; u32 device_base; diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h index c671a0aea5..984935d86b 100644 --- a/include/asm-x86/dma-mapping.h +++ b/include/asm-x86/dma-mapping.h @@ -10,6 +10,8 @@ #include #include +extern dma_addr_t bad_dma_address; + struct dma_mapping_ops { int (*mapping_error)(dma_addr_t dma_addr); void* (*alloc_coherent)(struct device *dev, size_t size, diff --git a/include/asm-x86/dma-mapping_64.h b/include/asm-x86/dma-mapping_64.h index 9674dac9fa..352bf4164a 100644 --- a/include/asm-x86/dma-mapping_64.h +++ b/include/asm-x86/dma-mapping_64.h @@ -1,7 +1,6 @@ #ifndef _X8664_DMA_MAPPING_H #define _X8664_DMA_MAPPING_H 1 -extern dma_addr_t bad_dma_address; extern int iommu_merge; static inline int dma_mapping_error(dma_addr_t dma_addr)