x86: dma-ops on highmem fix
[sfrench/cifs-2.6.git] / include / asm-x86 / dma-mapping_64.h
1 #ifndef _X8664_DMA_MAPPING_H
2 #define _X8664_DMA_MAPPING_H 1
3
4 extern dma_addr_t bad_dma_address;
5 extern int iommu_merge;
6
7 static inline int dma_mapping_error(dma_addr_t dma_addr)
8 {
9         if (dma_ops->mapping_error)
10                 return dma_ops->mapping_error(dma_addr);
11
12         return (dma_addr == bad_dma_address);
13 }
14
15 extern int dma_supported(struct device *hwdev, u64 mask);
16
17 /* same for gart, swiotlb, and nommu */
18 static inline int dma_get_cache_alignment(void)
19 {
20         return boot_cpu_data.x86_clflush_size;
21 }
22
23 #define dma_is_consistent(d, h) 1
24
25 extern int dma_set_mask(struct device *dev, u64 mask);
26
27 static inline void
28 dma_cache_sync(struct device *dev, void *vaddr, size_t size,
29         enum dma_data_direction dir)
30 {
31         flush_write_buffers();
32 }
33
34 extern struct device fallback_dev;
35 extern int panic_on_overflow;
36
37 #endif /* _X8664_DMA_MAPPING_H */