Re: [PATCH] iommu: Remove stub functions for !CONFIG_IOMMU_API

Ohad Ben-Cohen
2011-08-27T11:57:03Z

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).

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...