Hi Laurent, On Thu, Jan 03, 2019 at 12:52:00AM +0200, Laurent Pinchart wrote: > Hi Sakari, > > Thank you for the patch. > > On Wednesday, 2 January 2019 23:16:57 EET Sakari Ailus wrote: > > 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. > > Why is that ? Could the IPU3 IOMMU be implemented as an IOMMU driver ? You could do that, but: - it's a single PCI device so there's no advantage in doing so and - doing that would render the device inoperable if an IOMMU is enabled in the system, as chaining IOMMUs is not supported in the IOMMU framework AFAIK. > > > 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@xxxxxxxxxxxxxxx> > > --- > > drivers/Makefile | 2 +- > > drivers/iommu/Kconfig | 7 ++++--- > > 2 files changed, 5 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/Makefile b/drivers/Makefile > > index 578f469f72fb..d9c469983592 100644 > > --- a/drivers/Makefile > > +++ b/drivers/Makefile > > @@ -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/ > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > index d9a25715650e..d2c83e62873d 100644 > > --- a/drivers/iommu/Kconfig > > +++ b/drivers/iommu/Kconfig > > @@ -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 > > > -- > Regards, > > Laurent Pinchart > > > -- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxx