Messages in this thread | | | Subject | Re: [PATCH 21 of 53] ipath - use phys_to_virt instead of bus_to_virt | From | Roland Dreier <> | Date | Mon, 15 May 2006 14:28:45 -0700 |
| |
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |