Skip to contentSkip to conversation

make vendor specific subdirectory inclusion conditional

PATCH Superseded Rolf Eike Beer 2 participants 8 messages Mar 11, 2025 – Mar 20, 2025

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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

Signature · 17 lines
Rolf Eike Beer

We are nominated for the embedded award Visit us at the embedded 
world 2025 March 11th to 13th, 2025 | Nuremberg Find us in hall 4 at 
booth 336

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
#1 lore raw

PATCH 1/4 iommu: remove duplicate selection of DMAR_TABLE

This is already done in intel/Kconfig.

Fixes 70bad345e622 ("iommu: Fix compilation without CONFIG_IOMMU_INTEL")
---
 drivers/iommu/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/iommu/Kconfig +0 -1
index ec1b5e32b972..fceea41b7f58 100644
@@ -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 · 21 lines
2.48.1


-- 
Rolf Eike Beer

We are nominated for the embedded award Visit us at the embedded 
world 2025 March 11th to 13th, 2025 | Nuremberg Find us in hall 4 at 
booth 336

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
#2 lore raw

PATCH 2/4 iommu: make inclusion of intel directory conditional

In reply to Rolf Eike Beer

Nothing in there is active if CONFIG_INTEL_IOMMU is not enabled, so the whole directory can depend on that switch as well.

Fixes ab65ba57e3ac ("iommu/vt-d: Move Kconfig and Makefile bits down into intel directory")
---
 drivers/iommu/Makefile       | 3 ++-
 drivers/iommu/intel/Makefile | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/iommu/Makefile +2 -1
index 5e5a83c6c2aa..ed673c8fd056 100644
@@ -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_API) += iommu-traces.o
 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
drivers/iommu/intel/Makefile +0 -2
index 6c7528130cf9..7007db03b351 100644
@@ -5,7 +5,5 @@ obj-$(CONFIG_DMAR_TABLE) += 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 · 21 lines
2.48.1


-- 
Rolf Eike Beer

We are nominated for the embedded award Visit us at the embedded 
world 2025 March 11th to 13th, 2025 | Nuremberg Find us in hall 4 at 
booth 336

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
#3 lore raw

PATCH 3/4 iommu: make inclusion of amd directory conditional

In reply to Rolf Eike Beer

Nothing in there is active if CONFIG_AMD_IOMMU is not enabled, so the whole directory can depend on that switch as well.

Fixes cbe94c6e1a7d ("iommu/amd: Move Kconfig and Makefile bits down into amd directory")
---
 drivers/iommu/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/Makefile +2 -1
index ed673c8fd056..41b00cdc8621 100644
@@ -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_API) += iommu-traces.o
Signature · 21 lines
2.48.1


-- 
Rolf Eike Beer

We are nominated for the embedded award Visit us at the embedded 
world 2025 March 11th to 13th, 2025 | Nuremberg Find us in hall 4 at 
booth 336

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
#4 lore raw

PATCH 4/4 iommu: make inclusion of riscv directory conditional

In reply to Rolf Eike Beer

Nothing in there is active if CONFIG_RISCV_IOMMU is not enabled, so the whole directory can depend on that switch as well.

Fixes 5c0ebbd3c6c6 ("iommu/riscv: Add RISC-V IOMMU platform device driver")
---
 drivers/iommu/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/Makefile +2 -1
index 41b00cdc8621..17133876f777 100644
@@ -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_API) += iommu-traces.o
 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
Signature · 21 lines
2.48.1


-- 
Rolf Eike Beer

We are nominated for the embedded award Visit us at the embedded 
world 2025 March 11th to 13th, 2025 | Nuremberg Find us in hall 4 at 
booth 336

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
maintainer
#5 lore raw

Re: [PATCH 4/4] iommu: make inclusion of riscv directory conditional

Quoted 14 lines · Rolf Eike Beer

Nothing in there is active if CONFIG_RISCV_IOMMU is not enabled, so the whole directory can depend on that switch as well.

Fixes 5c0ebbd3c6c6 ("iommu/riscv: Add RISC-V IOMMU platform device driver")
---
 drivers/iommu/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/Makefile +0 -0
index 41b00cdc8621..17133876f777 100644

drivers/iommu/Makefile line 8

Quoted 9 lines
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_API) += iommu-traces.o
 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o

This allows for some additional cleanups in the Makefiles of the sub-directory, no? Same for the other patches in this series.

Regards,

Joerg

#6 lore raw

Re: [PATCH 4/4] iommu: make inclusion of riscv directory conditional

Quoted 25 lines · On Donnerstag, 20. März 2025 09:07:29 Mitteleuropäische Normalzeit Joerg…
Quoted 24 lines · Rolf Eike Beer

Nothing in there is active if CONFIG_RISCV_IOMMU is not enabled, so the whole directory can depend on that switch as well.

Fixes 5c0ebbd3c6c6 ("iommu/riscv: Add RISC-V IOMMU platform device

driver") Signed-off-by: Rolf Eike Beer <[email protected]>
---

 drivers/iommu/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/Makefile +1 -1
index 41b00cdc8621..17133876f777 100644
@@ -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/
Quoted 8 lines
Quoted 5 lines
drivers/iommu/Makefile +1 -0
+obj-$(CONFIG_RISCV_IOMMU) += riscv/

obj-$(CONFIG_IOMMU_API) += iommu.o
obj-$(CONFIG_IOMMU_API) += iommu-traces.o
obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o

This allows for some additional cleanups in the Makefiles of the sub-directory, no? Same for the other patches in this series.

Yes, and I can send those cleanups as a followup if you like. But for the first step I wanted to keep this as less invasive as it could be. And to be honest I didn't want to invest time to do this cleanups if it's unclear if they would be rejected anyway because these things are this way on purpose.

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
maintainer
#7 lore raw

Re: [PATCH 4/4] iommu: make inclusion of riscv directory conditional

Quoted 4 lines · Rolf Eike Beer

Yes, and I can send those cleanups as a followup if you like. But for the first step I wanted to keep this as less invasive as it could be. And to be honest I didn't want to invest time to do this cleanups if it's unclear if they would be rejected anyway because these things are this way on purpose.

I am fine with these cleanups and they are contained enough to also take care of the vendor-specific Makefiles in the same series.

Regards,

Joerg