Messages in this thread |  | | Date | Sat, 06 Oct 2001 01:38:19 -0700 (PDT) | Subject | Re: how to get virtual address from dma address | From | "David S. Miller" <> |
| |
From: Paul Mackerras <paulus@samba.org> Date: Sat, 6 Oct 2001 18:06:23 +1000 (EST)
The argument for supplying this functionality in the PCI DMA code would be that if it was done there it could be done once, and in a sophisticated and efficient (and SMP-safe :) fashion, rather than ad-hoc in each driver.
The argument against it is that if you provide such an easy way out, people will just blindly transform bus_to_virt/virt_to_bus without considering more straightforward methods when they exist.
I can not even count on one hand how many people I've helped converting, who wanted a bus_to_virt() and when I showed them how to do it with information the device provided already they said "oh wow, I never would have thought of that". That process won't happen as often with the suggested feature.
I am adamently against generic infrastructure to do this. Yes, it's social engineering, tough cookies... it's social engineering that I know is working :-)
Franks a lot, David S. Miller davem@redhat.com - 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/
|  |