diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2018-07-14 10:46:58 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-07-20 15:44:24 +0300 |
commit | 85319dcc8955f8f31828dc8bafff29f6aa011d93 (patch) | |
tree | 83b5de3dfe789b170a7e6b4f5fc377f89c60b028 /include/linux/intel-iommu.h | |
parent | 9ddbfb42138d84bb326023616c40a3dc30ea2837 (diff) | |
download | linux-85319dcc8955f8f31828dc8bafff29f6aa011d93.tar.xz |
iommu/vt-d: Add for_each_device_domain() helper
This adds a helper named for_each_device_domain() to iterate
over the elements in device_domain_list and invoke a callback
against each element. This allows to search the device_domain
list in other source files.
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/intel-iommu.h')
-rw-r--r-- | include/linux/intel-iommu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 2e1fbde020ca..4fd4c6fee93e 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h @@ -520,6 +520,8 @@ struct dmar_domain *get_valid_domain_for_dev(struct device *dev); void *alloc_pgtable_page(int node); void free_pgtable_page(void *vaddr); struct intel_iommu *domain_get_iommu(struct dmar_domain *domain); +int for_each_device_domain(int (*fn)(struct device_domain_info *info, + void *data), void *data); #ifdef CONFIG_INTEL_IOMMU_SVM extern int intel_svm_alloc_pasid_tables(struct intel_iommu *iommu); |