Skip to content

Commit ed3119e

Browse files
krzkjoergroedel
authored andcommitted
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: kbuild test robot <[email protected]> Fixes: e93a169 ("iommu: Enable compile testing for some of drivers") Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Borislav Petkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent e18a8c1 commit ed3119e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/include/asm/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define _ASM_X86_DEVICE_H
44

55
struct dev_archdata {
6-
#if defined(CONFIG_INTEL_IOMMU) || defined(CONFIG_AMD_IOMMU)
6+
#ifdef CONFIG_IOMMU_API
77
void *iommu; /* hook for IOMMU specific extension */
88
#endif
99
};

0 commit comments

Comments
 (0)