1 #ifndef _ASM_I386_DMA_MAPPING_H
2 #define _ASM_I386_DMA_MAPPING_H
5 #include <linux/scatterlist.h>
12 dma_mapping_error(dma_addr_t dma_addr)
17 extern int forbid_dac;
20 dma_supported(struct device *dev, u64 mask)
23 * we fall back to GFP_DMA when the mask isn't all 1s,
24 * so we can't guarantee allocations that must be
25 * within a tighter range than GFP_DMA..
30 /* Work around chipset bugs */
31 if (forbid_dac > 0 && mask > 0xffffffffULL)
38 dma_set_mask(struct device *dev, u64 mask)
40 if(!dev->dma_mask || !dma_supported(dev, mask))
43 *dev->dma_mask = mask;
49 dma_get_cache_alignment(void)
51 /* no easy way to get cache size on all x86, so return the
52 * maximum possible, to be safe */
53 return (1 << INTERNODE_CACHE_SHIFT);
56 #define dma_is_consistent(d, h) (1)
59 dma_cache_sync(struct device *dev, void *vaddr, size_t size,
60 enum dma_data_direction direction)
62 flush_write_buffers();
65 #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
67 dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
68 dma_addr_t device_addr, size_t size, int flags);
71 dma_release_declared_memory(struct device *dev);
74 dma_mark_declared_memory_occupied(struct device *dev,
75 dma_addr_t device_addr, size_t size);