1 #include <linux/types.h>
2 #include <linux/kernel.h>
3 #include <linux/module.h>
4 #include <linux/intel-iommu.h>
7 vtd_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
10 return intel_alloc_coherent(dev, size, dma_handle, flags);
12 EXPORT_SYMBOL_GPL(vtd_alloc_coherent);
15 vtd_free_coherent(struct device *dev, size_t size, void *vaddr,
16 dma_addr_t dma_handle)
18 intel_free_coherent(dev, size, vaddr, dma_handle);
20 EXPORT_SYMBOL_GPL(vtd_free_coherent);
23 vtd_map_single_attrs(struct device *dev, void *addr, size_t size,
24 int dir, struct dma_attrs *attrs)
26 return intel_map_single(dev, (phys_addr_t)addr, size, dir);
28 EXPORT_SYMBOL_GPL(vtd_map_single_attrs);
31 vtd_unmap_single_attrs(struct device *dev, dma_addr_t iova, size_t size,
32 int dir, struct dma_attrs *attrs)
34 intel_unmap_single(dev, iova, size, dir);
36 EXPORT_SYMBOL_GPL(vtd_unmap_single_attrs);
39 vtd_map_sg_attrs(struct device *dev, struct scatterlist *sglist, int nents,
40 int dir, struct dma_attrs *attrs)
42 return intel_map_sg(dev, sglist, nents, dir);
44 EXPORT_SYMBOL_GPL(vtd_map_sg_attrs);
47 vtd_unmap_sg_attrs(struct device *dev, struct scatterlist *sglist,
48 int nents, int dir, struct dma_attrs *attrs)
50 intel_unmap_sg(dev, sglist, nents, dir);
52 EXPORT_SYMBOL_GPL(vtd_unmap_sg_attrs);
55 vtd_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
59 EXPORT_SYMBOL_GPL(vtd_dma_mapping_error);