]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iommu/iova: Allow compiling the library without IOMMU support
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 2 Jan 2019 21:16:57 +0000 (23:16 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 11 Jan 2019 11:26:43 +0000 (12:26 +0100)
Drivers such as the Intel IPU3 ImgU driver use the IOVA library to manage
the device's own virtual address space while not implementing the IOMMU
API. Currently the IOVA library is only compiled if the IOMMU support is
enabled, resulting into a failure during linking due to missing symbols.

Fix this by defining IOVA library Kconfig bits independently of IOMMU
support configuration, and descending to the iommu directory
unconditionally during the build.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/Makefile
drivers/iommu/Kconfig

index e1ce029d28fdba01b73752d311d072ec6b81fab5..04da7876032cc303e87f70b9fc3186eb796cc757 100644 (file)
@@ -56,7 +56,7 @@ obj-y                         += tty/
 obj-y                          += char/
 
 # iommu/ comes before gpu as gpu are using iommu controllers
-obj-$(CONFIG_IOMMU_SUPPORT)    += iommu/
+obj-y                          += iommu/
 
 # gpu/ comes after char for AGP vs DRM startup and after iommu
 obj-y                          += gpu/
index d9a25715650e40565ea0ac99884a5f87b3317d06..d2c83e62873d5a2b7d0f7f64132b9db7fd89a44a 100644 (file)
@@ -1,3 +1,7 @@
+# The IOVA library may also be used by non-IOMMU_API users
+config IOMMU_IOVA
+       tristate
+
 # IOMMU_API always gets selected by whoever wants it.
 config IOMMU_API
        bool
@@ -81,9 +85,6 @@ config IOMMU_DEFAULT_PASSTHROUGH
 
          If unsure, say N here.
 
-config IOMMU_IOVA
-       tristate
-
 config OF_IOMMU
        def_bool y
        depends on OF && IOMMU_API