Skip to content

Commit bd3c2e6

Browse files
Sakari Ailusjoergroedel
authored andcommitted
iommu/iova: Allow compiling the library without IOMMU support
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>
1 parent bfeffd1 commit bd3c2e6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ obj-y += tty/
5656
obj-y += char/
5757

5858
# iommu/ comes before gpu as gpu are using iommu controllers
59-
obj-$(CONFIG_IOMMU_SUPPORT) += iommu/
59+
obj-y += iommu/
6060

6161
# gpu/ comes after char for AGP vs DRM startup and after iommu
6262
obj-y += gpu/

drivers/iommu/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# The IOVA library may also be used by non-IOMMU_API users
2+
config IOMMU_IOVA
3+
tristate
4+
15
# IOMMU_API always gets selected by whoever wants it.
26
config IOMMU_API
37
bool
@@ -81,9 +85,6 @@ config IOMMU_DEFAULT_PASSTHROUGH
8185

8286
If unsure, say N here.
8387

84-
config IOMMU_IOVA
85-
tristate
86-
8788
config OF_IOMMU
8889
def_bool y
8990
depends on OF && IOMMU_API

0 commit comments

Comments
 (0)