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

From: Roedel, Joerg
Date: Mon Aug 29 2011 - 09:07:57 EST


On Mon, Aug 29, 2011 at 08:55:40AM -0400, Ohad Ben-Cohen wrote:
> On Mon, Aug 29, 2011 at 3:25 PM, Roedel, Joerg <Joerg.Roedel@xxxxxxx> wrote:
> > Right, when the system has an iommu then the iommu-api is the right
> > choice to do that. But how to you handle this on systems without an
> > iommu?
>
> On iommu-less systems this is completely moot, as the remote processor
> can access the bus directly, and thus doesn't need any iommu
> configuration to take place before it boots.
>
> So in case there is an iommu - we configure it appropriately, and if
> there isn't, we just skip that part.

So in this case you can skip this whole part when CONFIG_IOMMU_API is
disabled (just don't compile the code in that requires the iommu-api).
This saves you even more .text size, 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/