From: Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
To: Sakari Ailus <sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
bingbu.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
rajmohan.mani-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
yong.zhi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
tian.shu.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1] iova: Allow compiling the library without IOMMU support
Date: Thu, 03 Jan 2019 00:52:00 +0200 [thread overview]
Message-ID: <12009133.IFJkWA3Ofo@avalon> (raw)
In-Reply-To: <20190102211657.13192-1-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
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 ?
> 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-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
> 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
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>,
yong.zhi@intel.com, iommu@lists.linux-foundation.org,
linux-media@vger.kernel.org, tfiga@chromium.org,
rajmohan.mani@intel.com, hans.verkuil@cisco.com,
mchehab@kernel.org, bingbu.cao@intel.com, tian.shu.qiu@intel.com
Subject: Re: [PATCH 1/1] iova: Allow compiling the library without IOMMU support
Date: Thu, 03 Jan 2019 00:52:00 +0200 [thread overview]
Message-ID: <12009133.IFJkWA3Ofo@avalon> (raw)
In-Reply-To: <20190102211657.13192-1-sakari.ailus@linux.intel.com>
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 ?
> 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>
> ---
> 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
next prev parent reply other threads:[~2019-01-02 22:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 21:16 [PATCH 1/1] iova: Allow compiling the library without IOMMU support Sakari Ailus
2019-01-02 21:16 ` Sakari Ailus
[not found] ` <20190102211657.13192-1-sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2019-01-02 22:52 ` Laurent Pinchart [this message]
2019-01-02 22:52 ` Laurent Pinchart
2019-01-03 20:11 ` Sakari Ailus
2019-01-03 20:11 ` Sakari Ailus
[not found] ` <20190103201126.zzqpn2eylm4m2zxn-WV0MzMiPiMJ82hYKe6nXyg@public.gmane.org>
2019-01-03 21:33 ` Aaron Sierra
2019-01-03 21:33 ` Aaron Sierra
2019-01-11 11:27 ` Joerg Roedel
2019-01-11 11:27 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12009133.IFJkWA3Ofo@avalon \
--to=laurent.pinchart-rylnwiuwjnjg/c1bvhzhaw@public.gmane.org \
--cc=bingbu.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rajmohan.mani-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=tian.shu.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=yong.zhi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.