Bryan> As Segher mentioned, bus_to_virt is unportable, so it's
    Bryan> definitely the wrong thing to use.

Yes, but at least it says what you're trying to do.  asm-powerpc's
io.h has this for phys_to_virt:

 *      This function does not handle bus mappings for DMA transfers. In
 *      almost all conceivable cases a device driver should not be using
 *      this function

so replacing bus_to_virt with that is not a step forward.

    Bryan> Any ideas?  Should this turn from a one-liner into a
    Bryan> big-refactor-for-2.6.18 patch?

I don't think there's a quick way to fix this.  What you really want
to do is override the DMA mapping functions for your device so that
you can keep track of the kernel mapping.  powerpc can already do this
(cf the ehca driver), and I think patches to do it on x86-64 are
floating around as part of the "Calgary IOMMU" work.

 - R.
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to