提交 ed3119e4 编写于 作者: K Krzysztof Kozlowski 提交者: Joerg Roedel

x86: Hide the archdata.iommu field behind generic IOMMU_API

There is a generic, kernel wide configuration symbol for enabling the
IOMMU specific bits: CONFIG_IOMMU_API.  Implementations (including
INTEL_IOMMU and AMD_IOMMU driver) select it so use it here as well.

This makes the conditional archdata.iommu field consistent with other
platforms and also fixes any compile test builds of other IOMMU drivers,
when INTEL_IOMMU or AMD_IOMMU are not selected).

For the case when INTEL_IOMMU/AMD_IOMMU and COMPILE_TEST are not
selected, this should create functionally equivalent code/choice.  With
COMPILE_TEST this field could appear if other IOMMU drivers are chosen
but neither INTEL_IOMMU nor AMD_IOMMU are not.
Reported-by: Nkbuild test robot <lkp@intel.com>
Fixes: e93a1695 ("iommu: Enable compile testing for some of drivers")
Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: NBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20200518120855.27822-2-krzk@kernel.orgSigned-off-by: NJoerg Roedel <jroedel@suse.de>
上级 e18a8c10
......@@ -3,7 +3,7 @@
#define _ASM_X86_DEVICE_H
struct dev_archdata {
#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
#ifdef CONFIG_IOMMU_API
void *iommu; /* hook for IOMMU specific extension */
#endif
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册