ia64: Hide the archdata.iommu field behind generic IOMMU_API
PATCH 1/2 ia64: 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 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 is not selected).
For the case when INTEL_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 INTEL_IOMMU not.
---
See:
https://lore.kernel.org/lkml/202005181412.frC4juFy%[email protected]/
--- arch/ia64/include/asm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/device.h +1 -1
@@ -6,7 +6,7 @@#define _ASM_IA64_DEVICE_Hstruct dev_archdata { -#ifdef CONFIG_INTEL_IOMMU +#ifdef CONFIG_IOMMU_API void *iommu;/* hook for IOMMU specific extension */ #endif };
Signature · 1 line
2.17.1
PATCH 2/2 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.
--- arch/x86/include/asm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/device.h +1 -1
@@ -3,7 +3,7 @@#define _ASM_X86_DEVICE_Hstruct dev_archdata { -#if defined(CONFIG_INTEL_IOMMU ) || defined(CONFIG_AMD_IOMMU ) +#ifdef CONFIG_IOMMU_API void *iommu;/* hook for IOMMU specific extension */ #endif };
Signature · 1 line
2.17.1
Re: [PATCH 2/2] x86: Hide the archdata.iommu field behind generic IOMMU_API
Quoted 24 lines · Krzysztof Kozlowski
There is a generic, kernel wide configuration symbol for enabling the IOMMU specific bits:
CONFIG_IOMMU_API. Implementations (includingINTEL_IOMMUandAMD_IOMMUdriver) 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_IOMMUorAMD_IOMMUare not selected).For the case when INTEL_IOMMU/AMD_IOMMU and
COMPILE_TESTare not selected, this should create functionally equivalent code/choice. WithCOMPILE_TESTthis field could appear if other IOMMU drivers are chosen but neitherINTEL_IOMMUnorAMD_IOMMUare not.Reported-by kbuild test robot <[email protected]>Signed-off-by Krzysztof Kozlowski <[email protected]>--- arch/x86/include/asm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/x86/include/asm/device.h +0
-0
arch/x86/include/asm/device.h line 9
Quoted 8 lines
arch/x86/include/asm/device.h +1
-1@@ -3,7 +3,7 @@#define _ASM_X86_DEVICE_Hstruct dev_archdata { -#if defined(CONFIG_INTEL_IOMMU ) || defined(CONFIG_AMD_IOMMU ) +#ifdef CONFIG_IOMMU_API void *iommu;/* hook for IOMMU specific extension */ #endif };
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquetteJoerg Roedel
AppliedQuoted 16 lines · Krzysztof Kozlowski
There is a generic, kernel wide configuration symbol for enabling the IOMMU specific bits:
CONFIG_IOMMU_API. Implementations (includingINTEL_IOMMUdriver) 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_IOMMUis not selected).For the case when
INTEL_IOMMUandCOMPILE_TESTare not selected, this should create functionally equivalent code/choice. WithCOMPILE_TESTthis field could appear if other IOMMU drivers are chosen butINTEL_IOMMUnot.Reported-by kbuild test robot <[email protected]>Signed-off-by Krzysztof Kozlowski <[email protected]>
Quoted 7 lines
---
See:
https://lore.kernel.org/lkml/202005181412.frC4juFy%[email protected]/--- arch/ia64/include/asm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied both to iommu/fixes.