*参照元 [#j02ed86a]
#backlinks

*説明 [#v9c36bc6]
-パス: [[linux-4.4.1/include/linux/iommu.h]]

-FIXME: これは何?
--説明


**参考 [#n29a51b5]


*実装 [#n9a339a2]
 /**
  * struct iommu_ops - iommu ops and capabilities
  * @domain_init: init iommu domain
  * @domain_destroy: destroy iommu domain
  * @attach_dev: attach device to an iommu domain
  * @detach_dev: detach device from an iommu domain
  * @map: map a physically contiguous memory region to an iommu domain
  * @unmap: unmap a physically contiguous memory region from an iommu domain
  * @map_sg: map a scatter-gather list of physically contiguous memory chunks
  * to an iommu domain
  * @iova_to_phys: translate iova to physical address
  * @add_device: add device to iommu grouping
  * @remove_device: remove device from iommu grouping
  * @domain_get_attr: Query domain attributes
  * @domain_set_attr: Change domain attributes
  * @of_xlate: add OF master IDs to iommu grouping
  * @pgsize_bitmap: bitmap of supported page sizes
  * @priv: per-instance data private to the iommu driver
  */
 struct iommu_ops {
 	bool (*capable)(enum iommu_cap);
 
-
--[[linux-4.4.1/iommu_cap]]

 	/* Domain allocation and freeing by the iommu driver */
 	struct iommu_domain *(*domain_alloc)(unsigned iommu_domain_type);
 	void (*domain_free)(struct iommu_domain *);
 
-
--[[linux-4.4.1/iommu_domain]]

 	int (*attach_dev)(struct iommu_domain *domain, struct device *dev);
 	void (*detach_dev)(struct iommu_domain *domain, struct device *dev);
-
--[[linux-4.4.1/device]]

 	int (*map)(struct iommu_domain *domain, unsigned long iova,
 		   phys_addr_t paddr, size_t size, int prot);
 	size_t (*unmap)(struct iommu_domain *domain, unsigned long iova,
 		     size_t size);
 	size_t (*map_sg)(struct iommu_domain *domain, unsigned long iova,
 			 struct scatterlist *sg, unsigned int nents, int prot);
-
--[[linux-4.4.1/phys_addr_t]]
--[[linux-4.4.1/scatterlist]]

 	phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova);
-
--[[linux-4.4.1/dma_addr_t]]

 	int (*add_device)(struct device *dev);
 	void (*remove_device)(struct device *dev);
 	struct iommu_group *(*device_group)(struct device *dev);
-
--[[linux-4.4.1/iommu_group]]

 	int (*domain_get_attr)(struct iommu_domain *domain,
 			       enum iommu_attr attr, void *data);
 	int (*domain_set_attr)(struct iommu_domain *domain,
 			       enum iommu_attr attr, void *data);
 
-
--[[linux-4.4.1/iommu_attr]]

 	/* Request/Free a list of direct mapping requirements for a device */
 	void (*get_dm_regions)(struct device *dev, struct list_head *list);
 	void (*put_dm_regions)(struct device *dev, struct list_head *list);
 
-
--[[linux-4.4.1/list_head]]

 	/* Window handling functions */
 	int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr,
 				    phys_addr_t paddr, u64 size, int prot);
 	void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr);
 	/* Set the numer of window per domain */
 	int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count);
 	/* Get the numer of window per domain */
 	u32 (*domain_get_windows)(struct iommu_domain *domain);
 
 #ifdef CONFIG_OF_IOMMU
-
--[[linux-4.4.1/CONFIG_OF_IOMMU]]

 	int (*of_xlate)(struct device *dev, struct of_phandle_args *args);
-
--[[linux-4.4.1/of_phandle_args]]

 #endif
 
 	unsigned long pgsize_bitmap;
 	void *priv;
 };


*コメント [#da17bbcf]



トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS