dccp: do not assume DCCP code is non preemptible
[linux/fpc-iii.git] / arch / s390 / include / asm / dma-mapping.h
blob3249b746488961e8f64a401f45911abab45c4521
1 #ifndef _ASM_S390_DMA_MAPPING_H
2 #define _ASM_S390_DMA_MAPPING_H
4 #include <linux/kernel.h>
5 #include <linux/types.h>
6 #include <linux/mm.h>
7 #include <linux/scatterlist.h>
8 #include <linux/dma-attrs.h>
9 #include <linux/dma-debug.h>
10 #include <linux/io.h>
12 #define DMA_ERROR_CODE (~(dma_addr_t) 0x0)
14 extern struct dma_map_ops s390_pci_dma_ops;
16 static inline struct dma_map_ops *get_dma_ops(struct device *dev)
18 if (dev && dev->archdata.dma_ops)
19 return dev->archdata.dma_ops;
20 return &dma_noop_ops;
23 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
24 enum dma_data_direction direction)
28 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
30 if (!dev->dma_mask)
31 return false;
32 return addr + size - 1 <= *dev->dma_mask;
35 #endif /* _ASM_S390_DMA_MAPPING_H */