From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: "iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
David Brown <davidb@codeaurora.org>,
Stepan Moskovchenko <stepanm@codeaurora.org>
Subject: Re: [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API
Date: Mon, 29 Aug 2011 12:15:50 +0200 [thread overview]
Message-ID: <20110829101550.GT1923@amd.com> (raw)
In-Reply-To: <CAK=WgbaiNxo_226Zp9BZpgUjYFajnvgPPCjCOYP2Tj4pkWTwVA@mail.gmail.com>
On Sat, Aug 27, 2011 at 07:56:39AM -0400, Ohad Ben-Cohen wrote:
> On Fri, Aug 26, 2011 at 4:20 PM, Joerg Roedel <joerg.roedel@amd.com> wrote:
> > Remove most of the stub functions because they are only
> > allowed to use when CONFIG_IOMMU_API is set anyway. This
> > will catch missing 'select' entries in kconfig at compile
> > time already.
>
> I'm not sure we want this; think about a generic framework/driver that
> uses the IOMMU API only if the underlying hardware has an IOMMU and
> otherwise will skip calling the IOMMU API altogether (e.g. this is
> where remoteproc is headed).
CONFIG_IOMMU_API would just compile in drivers/iommu/iommu.c to provide
the base-functionality of the api. You don't need to select and IOMMU
driver in the first place if your board doesn't have one.
On the other side this change makes it easy for a developer to find
kconfig problems already at compile time when he/she uses iommu-api
functions without selecting the api.
> With this patch, such generic code will have to "select IOMMU_API"
> unconditionally, or it won't build when the hardware doesn't have an
> IOMMU (e.g. the DSP in at least several of the DaVinci SoC isn't
> behind an IOMMU). But doing so is a bit wasteful if there's no IOMMU
> hardware...
Isn't the abstraction that the drivers use the dma-api? There should be
an implementation that doesn't require the iommu-api for such devices,
no?
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2011-08-29 10:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 13:20 [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API Joerg Roedel
2011-08-27 11:56 ` Ohad Ben-Cohen
2011-08-29 10:15 ` Roedel, Joerg [this message]
2011-08-29 10:59 ` Ohad Ben-Cohen
2011-08-29 12:25 ` Roedel, Joerg
2011-08-29 12:55 ` Ohad Ben-Cohen
2011-08-29 13:05 ` Roedel, Joerg
2011-08-29 13:21 ` Ohad Ben-Cohen
2011-08-31 13:03 ` Roedel, Joerg
2011-09-02 0:57 ` Laura Abbott
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=20110829101550.GT1923@amd.com \
--to=joerg.roedel@amd.com \
--cc=davidb@codeaurora.org \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=stepanm@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox