diff options
| author | Jacob Pan <[email protected]> | 2020-05-16 14:20:44 +0800 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2020-05-18 15:37:25 +0200 |
| commit | 3db9983e4327f773c490de2a8c66d6000561d88a (patch) | |
| tree | 6372d5fa7297b8d7c1b771aa8004248ed07a0a1f /include/linux | |
| parent | 69cf449166987d9a041020be6422ee7bf94a7228 (diff) | |
iommu/vt-d: Move domain helper to header
Move domain helper to header to be used by SVA code.
Signed-off-by: Jacob Pan <[email protected]>
Signed-off-by: Lu Baolu <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/intel-iommu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 980234ae0312..ed7171d2ae1f 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h @@ -595,6 +595,12 @@ static inline void __iommu_flush_cache( clflush_cache_range(addr, size); } +/* Convert generic struct iommu_domain to private struct dmar_domain */ +static inline struct dmar_domain *to_dmar_domain(struct iommu_domain *dom) +{ + return container_of(dom, struct dmar_domain, domain); +} + /* * 0: readable * 1: writable |