[PATCH] [POWERPC] Add struct iommu_table argument to iommu_map_sg()

Olof Johansson olof at lixom.net
Wed Apr 30 03:54:17 EST 2008


On Tue, Apr 29, 2008 at 03:17:45PM +1000, Mark Nelson wrote:
> Make iommu_map_sg take a struct iommu_table. It did so before commit
> 740c3ce66700640a6e6136ff679b067e92125794 (iommu sg merging: ppc: make
> iommu respect the segment size limits).
>
> This stops the function looking in the archdata.dma_data for the iommu
> table because in the future it will be called with a device that has
> no table there.

The logical thing would be to add the archdata.dma_data to said device
instead, no? Without seeing the rest of the code that makes use of it
it's hard to tell anyway, so please post that.

> This also has the nice side effect of making iommu_map_sg() match the
> other map functions.

Consistency is good, but I wonder if the opposite wouldn't be the better
way to go here: always just pass down just the dev pointer instead. The
table can be reached from it.


-Olof



More information about the Linuxppc-dev mailing list