Messages in this thread | | | Date | Fri, 12 Oct 2012 08:53:58 -0700 | From | Alexander Duyck <> | Subject | Re: [PATCH v2 0/8] Improve performance of VM translation on x86_64 |
| |
On 10/12/2012 08:15 AM, Andi Kleen wrote: >> Could you also add a blurb in the Documentation/< appropriate file >> for device driver writes> mentioning the usage of __pa_symbol is >> preferred? > Device driver writer's shouldn't use any of this anyways, they should always > use the PCI DMA APIs and never DMA to the stack or to static variables. > > -Andi
__pa_symbol is very architecture specific. From what I can tell it only exists for the x86 and mips architectures. If a device driver is expected to function on things such as PowerPC you cannot use it. Everything I have read indicates that for virtual to physical translation in drivers it is preferred to use virt_to_phys, not __pa or __pa_symbol.
Thanks,
Alex
| |