make vendor specific subdirectory inclusion conditional
Subsystems (7)
v3 cover make vendor specific subdirectory inclusion conditional
I found it strange that the vendor specific subdirectories were unconditionally added. Everything in these directories obviously depends on the specific Kconfig option. This series cleans this up by making the directory itself depend on the respective option which looks more natural to me.
I must confess that I am too lazy to find a good solution for the "arm/" directory, so I left it as is.
Regards,
Eike
---
Changes in v3:
- added Reviewed-by: Lu Baolu <[email protected]>
- rebased on top of 2e9b2ee2ba403cbe270a8256b8794ef5ad19b38d
Changes in v2:
- clean up subdirectory Makefiles to use obj-y now
- add arm/arm-smmu-v3 and iommufd patches
Signature · 13 lines
Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
PATCH v3 1/6 iommu: remove duplicate selection of DMAR_TABLE
This is already done in intel/Kconfig.
--- drivers/iommu/Kconfig | 1 - 1 file changed, 1 deletion(-)
drivers/iommu/Kconfig +0 -1
@@ -200,7 +200,6 @@ source "drivers/iommu/riscv/Kconfig" config IRQ_REMAP bool "Support for Interrupt Remapping" depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI - select DMAR_TABLE if INTEL_IOMMU help Supports Interrupt remapping for IO-APIC and MSI devices. To use x2apic mode in the CPU's which support x2APIC enhancements or
Signature · 16 lines
2.49.0 -- Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
PATCH v3 2/6 iommu: make inclusion of intel directory conditional
In reply to Rolf Eike BeerNothing in there is active if CONFIG_INTEL_IOMMU is not enabled, so the whole directory can depend on that switch as well.
--- drivers/iommu/Makefile | 3 ++- drivers/iommu/intel/Makefile | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/iommu/Makefile +2 -1
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y += amd/ intel/ arm/ iommufd/ riscv/ +obj-y += amd/ arm/ iommufd/ riscv/ +obj-$(CONFIG_INTEL_IOMMU) += intel/ obj-$(CONFIG_IOMMU_API) += iommu.o obj-$(CONFIG_IOMMU_SUPPORT) += iommu-pages.o obj-$(CONFIG_IOMMU_API) += iommu-traces.o
drivers/iommu/intel/Makefile +2 -5
@@ -1,11 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_DMAR_TABLE) += dmar.o -obj-$(CONFIG_INTEL_IOMMU) += iommu.o pasid.o nested.o cache.o prq.o -obj-$(CONFIG_DMAR_TABLE) += trace.o +obj-y += iommu.o pasid.o nested.o cache.o prq.o +obj-$(CONFIG_DMAR_TABLE) += dmar.o trace.o obj-$(CONFIG_DMAR_PERF) += perf.o obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += debugfs.o obj-$(CONFIG_INTEL_IOMMU_SVM) += svm.o -ifdef CONFIG_INTEL_IOMMU obj-$(CONFIG_IRQ_REMAP) += irq_remapping.o -endif obj-$(CONFIG_INTEL_IOMMU_PERF_EVENTS) += perfmon.o
Signature · 17 lines
2.49.0 -- Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
PATCH v3 3/6 iommu: make inclusion of amd directory conditional
In reply to Rolf Eike BeerNothing in there is active if CONFIG_AMD_IOMMU is not enabled, so the whole directory can depend on that switch as well.
--- drivers/iommu/Makefile | 3 ++- drivers/iommu/amd/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/iommu/Makefile +2 -1
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y += amd/ arm/ iommufd/ riscv/ +obj-y += arm/ iommufd/ riscv/ +obj-$(CONFIG_AMD_IOMMU) += amd/ obj-$(CONFIG_INTEL_IOMMU) += intel/ obj-$(CONFIG_IOMMU_API) += iommu.o obj-$(CONFIG_IOMMU_SUPPORT) += iommu-pages.o
drivers/iommu/amd/Makefile +1 -1
@@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_AMD_IOMMU) += iommu.o init.o quirks.o io_pgtable.o io_pgtable_v2.o ppr.o pasid.o +obj-y += iommu.o init.o quirks.o io_pgtable.o io_pgtable_v2.o ppr.o pasid.o obj-$(CONFIG_AMD_IOMMU_DEBUGFS) += debugfs.o
Signature · 17 lines
2.49.0 -- Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
PATCH v3 4/6 iommu: make inclusion of riscv directory conditional
In reply to Rolf Eike BeerNothing in there is active if CONFIG_RISCV_IOMMU is not enabled, so the whole directory can depend on that switch as well.
--- drivers/iommu/Makefile | 3 ++- drivers/iommu/riscv/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/iommu/Makefile +2 -1
@@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y += arm/ iommufd/ riscv/ +obj-y += arm/ iommufd/ obj-$(CONFIG_AMD_IOMMU) += amd/ obj-$(CONFIG_INTEL_IOMMU) += intel/ +obj-$(CONFIG_RISCV_IOMMU) += riscv/ obj-$(CONFIG_IOMMU_API) += iommu.o obj-$(CONFIG_IOMMU_SUPPORT) += iommu-pages.o obj-$(CONFIG_IOMMU_API) += iommu-traces.o
drivers/iommu/riscv/Makefile +1 -1
@@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_RISCV_IOMMU) += iommu.o iommu-platform.o +obj-y += iommu.o iommu-platform.o obj-$(CONFIG_RISCV_IOMMU_PCI) += iommu-pci.o
Signature · 17 lines
2.49.0 -- Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
PATCH v3 5/6 iommu: make inclusion of arm/arm-smmu-v3 directory conditional
In reply to Rolf Eike BeerNothing in there is active if CONFIG_ARM_SMMU_V3 is not enabled, so the whole directory can depend on that switch as well.
--- drivers/iommu/arm/Makefile | 3 ++- drivers/iommu/arm/arm-smmu-v3/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/iommu/arm/Makefile +2 -1
@@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y += arm-smmu/ arm-smmu-v3/ +obj-y += arm-smmu/ +obj-$(CONFIG_ARM_SMMU_V3) += arm-smmu-v3/
drivers/iommu/arm/arm-smmu-v3/Makefile +1 -1
@@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_ARM_SMMU_V3) += arm_smmu_v3.o +obj-y += arm_smmu_v3.o arm_smmu_v3-y := arm-smmu-v3.o arm_smmu_v3-$(CONFIG_ARM_SMMU_V3_IOMMUFD) += arm-smmu-v3-iommufd.o arm_smmu_v3-$(CONFIG_ARM_SMMU_V3_SVA) += arm-smmu-v3-sva.o
Signature · 17 lines
2.49.0 -- Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
PATCH v3 6/6 iommu: make inclusion of iommufd directory conditional
In reply to Rolf Eike BeerNothing in there is active if CONFIG_IOMMUFD is not enabled, so the whole directory can depend on that switch as well.
--- drivers/iommu/Makefile | 3 ++- drivers/iommu/iommufd/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/iommu/Makefile +2 -1
@@ -1,8 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 -obj-y += arm/ iommufd/ +obj-y += arm/ obj-$(CONFIG_AMD_IOMMU) += amd/ obj-$(CONFIG_INTEL_IOMMU) += intel/ obj-$(CONFIG_RISCV_IOMMU) += riscv/ +obj-$(CONFIG_IOMMUFD) += iommufd/ obj-$(CONFIG_IOMMU_API) += iommu.o obj-$(CONFIG_IOMMU_SUPPORT) += iommu-pages.o obj-$(CONFIG_IOMMU_API) += iommu-traces.o
drivers/iommu/iommufd/Makefile +1 -1
@@ -12,7 +12,7 @@ iommufd-y := \ iommufd-$(CONFIG_IOMMUFD_TEST) += selftest.o -obj-$(CONFIG_IOMMUFD) += iommufd.o +obj-y += iommufd.o obj-$(CONFIG_IOMMUFD_DRIVER) += iova_bitmap.o iommufd_driver-y := driver.o
Signature · 17 lines
2.49.0 -- Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
Joerg Roedel
maintainerRe: [PATCH 6/6] iommu: make inclusion of iommufd directory conditional
Quoted 6 lines · Rolf Eike Beer
Nothing in there is active if
CONFIG_IOMMUFDis not enabled, so the whole directory can depend on that switch as well.Fixes 2ff4bed7fee7 ("iommufd: File descriptor, context, kconfig and makefiles")Signed-off-by Rolf Eike Beer <[email protected]>Reviewed-by Lu Baolu <[email protected]>
Had to remove this patch from the branch as it caused compile breakage with allmodconfig builds.
Re: [PATCH 6/6] iommu: make inclusion of iommufd directory conditional
Quoted 10 lines · On Freitag, 16. Mai 2025 14:52:08 Mitteleuropäische Sommerzeit Joerg Roedel…
Quoted 6 lines · Rolf Eike Beer
Nothing in there is active if
CONFIG_IOMMUFDis not enabled, so the whole directory can depend on that switch as well.Fixes 2ff4bed7fee7 ("iommufd: File descriptor, context, kconfig andmakefiles") Signed-off-by: Rolf Eike Beer <[email protected]>
Reviewed-by Lu Baolu <[email protected]>Had to remove this patch from the branch as it caused compile breakage with allmodconfig builds.
I did not catch that this is a tristate, not a bool. The same happens for patch 5, which is what the 0-day bot has reported.
Regards,
Eike
Signature · 13 lines
Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
Re: [PATCH 6/6] iommu: make inclusion of iommufd directory conditional
In reply to Joerg RoedelQuoted 10 lines · On Freitag, 16. Mai 2025 14:52:08 Mitteleuropäische Sommerzeit Joerg Roedel…
Quoted 6 lines · Rolf Eike Beer
Nothing in there is active if
CONFIG_IOMMUFDis not enabled, so the whole directory can depend on that switch as well.Fixes 2ff4bed7fee7 ("iommufd: File descriptor, context, kconfig andmakefiles") Signed-off-by: Rolf Eike Beer <[email protected]>
Reviewed-by Lu Baolu <[email protected]>Had to remove this patch from the branch as it caused compile breakage with allmodconfig builds.
Given Arnds fix for smmuv3 this patch may work when the last part in iommufd/ Makefile is omitted.
Regards,
Eike
Signature · 13 lines
Rolf Eike Beer emlix GmbH Headquarters: Berliner Str. 12, 37073 Göttingen, Germany Phone +49 (0)551 30664-0, e-mail [email protected] District Court of Göttingen, Registry Number HR B 3160 Managing Directors: Heike Jordan, Dr. Uwe Kracke VAT ID No. DE 205 198 055 Office Berlin: Panoramastr. 1, 10178 Berlin, Germany Office Bonn: Bachstr. 6, 53115 Bonn, Germany http://www.emlix.com emlix - your embedded Linux partner
Quoted 7 lines · Rolf Eike Beer
I found it strange that the vendor specific subdirectories were unconditionally added. Everything in these directories obviously depends on the specific
Kconfigoption. This series cleans this up by making the directory itself depend on the respective option which looks more natural to me.I must confess that I am too lazy to find a good solution for the "arm/" directory, so I left it as is.
Applied, thanks.