[PATCH 6/6] iommu: make inclusion of iommufd directory conditional

Rolf Eike Beer posted 6 patches 9 months ago
There is a newer version of this series
[PATCH 6/6] iommu: make inclusion of iommufd directory conditional
Posted by Rolf Eike Beer 9 months ago
Nothing in there is active if CONFIG_IOMMUFD is 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 <eb@emlix.com>
---
 drivers/iommu/Makefile         | 3 ++-
 drivers/iommu/iommufd/Makefile | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
index 17133876f777..38ee96607acf 100644
--- a/drivers/iommu/Makefile
+++ b/drivers/iommu/Makefile
@@ -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_API) += iommu-traces.o
 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
diff --git a/drivers/iommu/iommufd/Makefile b/drivers/iommu/iommufd/Makefile
index cb784da6cddc..071f2a504167 100644
--- a/drivers/iommu/iommufd/Makefile
+++ b/drivers/iommu/iommufd/Makefile
@@ -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
-- 
2.49.0


-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail info@emlix.com
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
Posted by Baolu Lu 9 months ago
On 3/20/25 17:22, Rolf Eike Beer wrote:
> Nothing in there is active if CONFIG_IOMMUFD is 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<eb@emlix.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>