Commit 3db9983e authored by Jacob Pan's avatar Jacob Pan Committed by Joerg Roedel
Browse files

iommu/vt-d: Move domain helper to header

parent 69cf4491
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -441,12 +441,6 @@ static void init_translation_status(struct intel_iommu *iommu)
		iommu->flags |= VTD_FLAG_TRANS_PRE_ENABLED;
}

/* Convert generic 'struct iommu_domain to private struct dmar_domain */
static struct dmar_domain *to_dmar_domain(struct iommu_domain *dom)
{
	return container_of(dom, struct dmar_domain, domain);
}

static int __init intel_iommu_setup(char *str)
{
	if (!str)
+6 −0
Original line number Diff line number Diff line
@@ -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