aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/dma-mapping.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-25 17:36:39 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-19 13:19:57 -0400
commitb7107a3d9da2e122fb7f33dd1482254ff40fdf96 (patch)
treebc8169295d26a7e6f49b16a3688846e4f0841347 /include/asm-x86/dma-mapping.h
parentae17a63b096b05007bacafd2f92414b881a0b4b4 (diff)
x86: delete the arch-specific dma-mapping headers.
all the code that is left is ready to be merged as-is in dma-mapping.h. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/dma-mapping.h')
-rw-r--r--include/asm-x86/dma-mapping.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index 1c88ce6b50d6..914846d0beaa 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -11,6 +11,9 @@
11#include <asm/swiotlb.h> 11#include <asm/swiotlb.h>
12 12
13extern dma_addr_t bad_dma_address; 13extern dma_addr_t bad_dma_address;
14extern int iommu_merge;
15extern struct device fallback_dev;
16extern int panic_on_overflow;
14 17
15struct dma_mapping_ops { 18struct dma_mapping_ops {
16 int (*mapping_error)(dma_addr_t dma_addr); 19 int (*mapping_error)(dma_addr_t dma_addr);
@@ -75,12 +78,6 @@ void dma_free_coherent(struct device *dev, size_t size,
75extern int dma_supported(struct device *hwdev, u64 mask); 78extern int dma_supported(struct device *hwdev, u64 mask);
76extern int dma_set_mask(struct device *dev, u64 mask); 79extern int dma_set_mask(struct device *dev, u64 mask);
77 80
78#ifdef CONFIG_X86_32
79# include "dma-mapping_32.h"
80#else
81# include "dma-mapping_64.h"
82#endif
83
84static inline dma_addr_t 81static inline dma_addr_t
85dma_map_single(struct device *hwdev, void *ptr, size_t size, 82dma_map_single(struct device *hwdev, void *ptr, size_t size,
86 int direction) 83 int direction)
@@ -205,6 +202,15 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size,
205 flush_write_buffers(); 202 flush_write_buffers();
206} 203}
207 204
205static inline int dma_get_cache_alignment(void)
206{
207 /* no easy way to get cache size on all x86, so return the
208 * maximum possible, to be safe */
209 return boot_cpu_data.x86_clflush_size;
210}
211
212#define dma_is_consistent(d, h) (1)
213
208#ifdef CONFIG_X86_32 214#ifdef CONFIG_X86_32
209# define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY 215# define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
210extern int 216extern int
@@ -217,5 +223,6 @@ dma_release_declared_memory(struct device *dev);
217extern void * 223extern void *
218dma_mark_declared_memory_occupied(struct device *dev, 224dma_mark_declared_memory_occupied(struct device *dev,
219 dma_addr_t device_addr, size_t size); 225 dma_addr_t device_addr, size_t size);
226extern int forbid_dac;
220#endif /* CONFIG_X86_32 */ 227#endif /* CONFIG_X86_32 */
221#endif 228#endif