problems with iommu_free_table()

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Oct 26 17:21:26 EST 2004


On Tue, 2004-10-26 at 17:16 +1000, Benjamin Herrenschmidt wrote:
> I'll send a patch fixing G5 build by renaming iommu_free_table to
> tce_free_table() and putting the call in #ifdef CONFIG_PPC_PSERIES for
> now, but if you start hooking too much between prom.c and the higher
> level, you should start thinking about doing things differently. That is
> have of_remove_node() stay what it should have been from the beginning:
> a low level function removing the node and just that, and have the
> _caller_ to the grunt work of knowing what else need to be
> removed/freed/etc...

Ok, I'm keeping the name for now, just doing ifdef's plus adding a fat
comment to iommu.h

If you want iommu's in general to have the ability to add/remove tables,
then those calls (iommu_devnode_init, iommu_free_table, ...) should end
up beeing ppc_md. hooks so the actual implementation of the iommu knows
how to deal with them.

If that is to remain a pSeries-only API (I don't mind at this point),
then rename those to tce_* something or pSeries_iommu_* or whatever
making it clear they are pSeries only, and be careful of not breaking
build with non-pSeries.

Ben.





More information about the Linuxppc64-dev mailing list