Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.11-rc1 42 lines 1.1 kB view raw
1#ifndef _ASM_DMA_MAPPING_H 2#define _ASM_DMA_MAPPING_H 3 4#include <linux/scatterlist.h> 5#include <asm/dma-coherence.h> 6#include <asm/cache.h> 7 8#ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */ 9#include <dma-coherence.h> 10#endif 11 12extern const struct dma_map_ops *mips_dma_map_ops; 13 14static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) 15{ 16 return mips_dma_map_ops; 17} 18 19static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) 20{ 21 if (!dev->dma_mask) 22 return false; 23 24 return addr + size <= *dev->dma_mask; 25} 26 27static inline void dma_mark_clean(void *addr, size_t size) {} 28 29extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, 30 enum dma_data_direction direction); 31 32#define arch_setup_dma_ops arch_setup_dma_ops 33static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, 34 u64 size, const struct iommu_ops *iommu, 35 bool coherent) 36{ 37#ifdef CONFIG_DMA_PERDEV_COHERENT 38 dev->archdata.dma_coherent = coherent; 39#endif 40} 41 42#endif /* _ASM_DMA_MAPPING_H */