Skip to content

Commit

Permalink
x86: Hide the archdata.iommu field behind generic IOMMU_API
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
krzk authored and joergroedel committed May 27, 2020
1 parent e18a8c1 commit ed3119e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit ed3119e

Please sign in to comment.