Re: Suggestions for how to remove bus_to_virt()

From: David Miller
Date: Wed Jul 12 2006 - 19:39:46 EST


From: Ralph Campbell <ralphc@xxxxxxxxxxxxx>
Date: Wed, 12 Jul 2006 16:29:27 -0700

> Currently, the ib_ipath driver requires that the mapping be
> one-to-one since there is no practical way to reverse IOMMU
> mappings.

You can maintain a hash table that maps DMA addresses back to kernel
mappings. Depending upon your situation, you can optimize this to use
very small keys if you have some kind of other identification method
for your buffers.

That would be for dynamic mappings.

You were using consistent DMA memory, which I gather you're not,
you could use the PCI DMA pool mechanism.
-
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/