Skip to content

Commit 3db9983

Browse files
Jacob Panjoergroedel
authored andcommitted
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]>
1 parent 69cf449 commit 3db9983

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,6 @@ static void init_translation_status(struct intel_iommu *iommu)
441441
iommu->flags |= VTD_FLAG_TRANS_PRE_ENABLED;
442442
}
443443

444-
/* Convert generic 'struct iommu_domain to private struct dmar_domain */
445-
static struct dmar_domain *to_dmar_domain(struct iommu_domain *dom)
446-
{
447-
return container_of(dom, struct dmar_domain, domain);
448-
}
449-
450444
static int __init intel_iommu_setup(char *str)
451445
{
452446
if (!str)

include/linux/intel-iommu.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,12 @@ static inline void __iommu_flush_cache(
595595
clflush_cache_range(addr, size);
596596
}
597597

598+
/* Convert generic struct iommu_domain to private struct dmar_domain */
599+
static inline struct dmar_domain *to_dmar_domain(struct iommu_domain *dom)
600+
{
601+
return container_of(dom, struct dmar_domain, domain);
602+
}
603+
598604
/*
599605
* 0: readable
600606
* 1: writable

0 commit comments

Comments
 (0)