On 3/12/07, peter fuerst <post@xxxxxxxx> wrote:
On Mon, 12 Mar 2007, Franck Bui-Huu wrote: > Can you explain why the current use of pa() failed to handle all > kernel address with a real example ? Simply, when you convert between cached (kseg0, ckseg0, several xkphys- regions) and uncached (kseg1, ckseg1, several xkphys-regions) addresses and the other way round, you need the physical address as an intermediate value and __pa() or virt_to_phys() can support only one direction.
I was asking for _real_ uses. Can you point out some code where these convertion are needed ? I'm asking that because your uses of __pa()/virt_to_phys() to convert cached address into uncached address and vice versa is weird. You talked about drivers but I would think that drivers have physical addresses of the device they control. And they get a virtual address by using ioremap() and Co. And using __pa() on such addresses is simply buggy whatever the implementation of __pa(). -- Franck