[PATCH] iommu fixes, round 2

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Oct 27 09:46:57 EST 2004


> We feel that iommu_free_table() is generic so we've moved it to iommu.c.
> This fixes the build break (sorry g5 :).  It's complementary to
> iommu_init_table(), which is generic.  
> 
> Secondly, the attempt to free the table in of_remove_node() is "as
> symmetric as possible" with of_finish_node_dynamic(), where the table is
> allocated.  If that's what the comment means by layering violation, I
> humbly disagree. 

Nope. All the "finish" node routines are high level routines that parse
the device-tree to fill various additional things in the device nodes.
There are some remote plans of getting rid of them in the long run...

of_remove_node() is a low level routine that is responsible for removing
the node from the tree, and dealing with the /proc things, and that
should be all.

If you want to keep the iommu removal in prom.c, then you should create
an of_finish_dynamic_node() or something like that, that does that kind
of high level stuff before calling of_remove_node().

> Thirdly, iommu_devnode_init() also has an iSeries implementation, so
> it's not pSeries-specific.  No need to rename it, as suggested in the
> comment.

Then let's move it, but the fact that it does a kfree() and that sort
of things means it actually makes assumptions on how the iommu table was
allocated in the first place, which is not under control of the generic
code at this point.





More information about the Linuxppc64-dev mailing list