~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/iommu-dma.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/iommu-dma.h (Architecture mips) and /include/linux/iommu-dma.h (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * Copyright (c) 2024, NVIDIA CORPORATION & AF      3  * Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved
  4  *                                                  4  *
  5  * DMA operations that map physical memory thr      5  * DMA operations that map physical memory through IOMMU.
  6  */                                                 6  */
  7 #ifndef _LINUX_IOMMU_DMA_H                          7 #ifndef _LINUX_IOMMU_DMA_H
  8 #define _LINUX_IOMMU_DMA_H                          8 #define _LINUX_IOMMU_DMA_H
  9                                                     9 
 10 #include <linux/dma-direction.h>                   10 #include <linux/dma-direction.h>
 11                                                    11 
 12 #ifdef CONFIG_IOMMU_DMA                            12 #ifdef CONFIG_IOMMU_DMA
 13 static inline bool use_dma_iommu(struct device     13 static inline bool use_dma_iommu(struct device *dev)
 14 {                                                  14 {
 15         return dev->dma_iommu;                     15         return dev->dma_iommu;
 16 }                                                  16 }
 17 #else                                              17 #else
 18 static inline bool use_dma_iommu(struct device     18 static inline bool use_dma_iommu(struct device *dev)
 19 {                                                  19 {
 20         return false;                              20         return false;
 21 }                                                  21 }
 22 #endif /* CONFIG_IOMMU_DMA */                      22 #endif /* CONFIG_IOMMU_DMA */
 23                                                    23 
 24 dma_addr_t iommu_dma_map_page(struct device *d     24 dma_addr_t iommu_dma_map_page(struct device *dev, struct page *page,
 25                 unsigned long offset, size_t s     25                 unsigned long offset, size_t size, enum dma_data_direction dir,
 26                 unsigned long attrs);              26                 unsigned long attrs);
 27 void iommu_dma_unmap_page(struct device *dev,      27 void iommu_dma_unmap_page(struct device *dev, dma_addr_t dma_handle,
 28                 size_t size, enum dma_data_dir     28                 size_t size, enum dma_data_direction dir, unsigned long attrs);
 29 int iommu_dma_map_sg(struct device *dev, struc     29 int iommu_dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 30                 enum dma_data_direction dir, u     30                 enum dma_data_direction dir, unsigned long attrs);
 31 void iommu_dma_unmap_sg(struct device *dev, st     31 void iommu_dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
 32                 enum dma_data_direction dir, u     32                 enum dma_data_direction dir, unsigned long attrs);
 33 void *iommu_dma_alloc(struct device *dev, size     33 void *iommu_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
 34                 gfp_t gfp, unsigned long attrs     34                 gfp_t gfp, unsigned long attrs);
 35 int iommu_dma_mmap(struct device *dev, struct      35 int iommu_dma_mmap(struct device *dev, struct vm_area_struct *vma,
 36                 void *cpu_addr, dma_addr_t dma     36                 void *cpu_addr, dma_addr_t dma_addr, size_t size,
 37                 unsigned long attrs);              37                 unsigned long attrs);
 38 int iommu_dma_get_sgtable(struct device *dev,      38 int iommu_dma_get_sgtable(struct device *dev, struct sg_table *sgt,
 39                 void *cpu_addr, dma_addr_t dma     39                 void *cpu_addr, dma_addr_t dma_addr, size_t size,
 40                 unsigned long attrs);              40                 unsigned long attrs);
 41 unsigned long iommu_dma_get_merge_boundary(str     41 unsigned long iommu_dma_get_merge_boundary(struct device *dev);
 42 size_t iommu_dma_opt_mapping_size(void);           42 size_t iommu_dma_opt_mapping_size(void);
 43 size_t iommu_dma_max_mapping_size(struct devic     43 size_t iommu_dma_max_mapping_size(struct device *dev);
 44 void iommu_dma_free(struct device *dev, size_t     44 void iommu_dma_free(struct device *dev, size_t size, void *cpu_addr,
 45                 dma_addr_t handle, unsigned lo     45                 dma_addr_t handle, unsigned long attrs);
 46 dma_addr_t iommu_dma_map_resource(struct devic     46 dma_addr_t iommu_dma_map_resource(struct device *dev, phys_addr_t phys,
 47                 size_t size, enum dma_data_dir     47                 size_t size, enum dma_data_direction dir, unsigned long attrs);
 48 void iommu_dma_unmap_resource(struct device *d     48 void iommu_dma_unmap_resource(struct device *dev, dma_addr_t handle,
 49                 size_t size, enum dma_data_dir     49                 size_t size, enum dma_data_direction dir, unsigned long attrs);
 50 struct sg_table *iommu_dma_alloc_noncontiguous     50 struct sg_table *iommu_dma_alloc_noncontiguous(struct device *dev, size_t size,
 51                 enum dma_data_direction dir, g     51                 enum dma_data_direction dir, gfp_t gfp, unsigned long attrs);
 52 void iommu_dma_free_noncontiguous(struct devic     52 void iommu_dma_free_noncontiguous(struct device *dev, size_t size,
 53                 struct sg_table *sgt, enum dma     53                 struct sg_table *sgt, enum dma_data_direction dir);
 54 void *iommu_dma_vmap_noncontiguous(struct devi     54 void *iommu_dma_vmap_noncontiguous(struct device *dev, size_t size,
 55                 struct sg_table *sgt);             55                 struct sg_table *sgt);
 56 #define iommu_dma_vunmap_noncontiguous(dev, va     56 #define iommu_dma_vunmap_noncontiguous(dev, vaddr) \
 57         vunmap(vaddr);                             57         vunmap(vaddr);
 58 int iommu_dma_mmap_noncontiguous(struct device     58 int iommu_dma_mmap_noncontiguous(struct device *dev, struct vm_area_struct *vma,
 59                 size_t size, struct sg_table *     59                 size_t size, struct sg_table *sgt);
 60 void iommu_dma_sync_single_for_cpu(struct devi     60 void iommu_dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
 61                 size_t size, enum dma_data_dir     61                 size_t size, enum dma_data_direction dir);
 62 void iommu_dma_sync_single_for_device(struct d     62 void iommu_dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
 63                 size_t size, enum dma_data_dir     63                 size_t size, enum dma_data_direction dir);
 64 void iommu_dma_sync_sg_for_cpu(struct device *     64 void iommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl,
 65                 int nelems, enum dma_data_dire     65                 int nelems, enum dma_data_direction dir);
 66 void iommu_dma_sync_sg_for_device(struct devic     66 void iommu_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sgl,
 67                 int nelems, enum dma_data_dire     67                 int nelems, enum dma_data_direction dir);
 68                                                    68 
 69 #endif /* _LINUX_IOMMU_DMA_H */                    69 #endif /* _LINUX_IOMMU_DMA_H */
 70                                                    70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php