problems with iommu_free_table()
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Oct 27 09:32:35 EST 2004
On Tue, 2004-10-26 at 08:45 -0500, Olof Johansson wrote:
> Benjamin Herrenschmidt wrote:
> Actually, you're wrong. :) It's not pSeries-specific, see below.
Well, it's implemented in pSeries_iommu.c ...
> Yep, you're right. There's two ways to fix this: Add reference counting
> to the iommu tables and do automatic deallocation, or only delete the
> tables for PHB deallocation. The second option would be preferred, since
> it should be the right way to solve the layering violation.
Agreed.
> > 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,
>
> This is the wrong solution. iommu_free_table is a companion to
> iommu_init_table, and it _is_ generic code, it just ended up in the
> wrong file (I didn't catch that myself, sorry about that).
It's the right fix for now until you or John do something better :)
Besides, I don't fully agree with iommu_free_table() beeing the
'pending' of iommu_init_table() since it does kfree etc... it makes
assumptions on how the caller allocated the tables... not _that_ bad but
don't even try calling that on the U3 ones :)
More information about the Linuxppc64-dev
mailing list