Re: [PATCH v2 1/1] iommu/vt-d: Move intel_iommu_ops to header file

From: Lu Baolu
Date: Mon Feb 14 2022 - 20:33:01 EST


On 2/14/22 9:27 PM, Joerg Roedel wrote:
On Mon, Feb 07, 2022 at 04:12:40PM +0200, Andy Shevchenko wrote:
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 69230fd695ea..1036c1900b5c 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -813,6 +813,8 @@ bool context_present(struct context_entry *context);
struct context_entry *iommu_context_addr(struct intel_iommu *iommu, u8 bus,
u8 devfn, int alloc);
+extern const struct iommu_ops intel_iommu_ops;
+
The intel_iommu_ops symbol is only used in drivers/iommu/intel, so I
would prefer a header in that directory. But I leave that up to Baolu to
decide.

Agreed. I also have a plan to split them out into a internal header.

Best regards,
baolu