I was wondering if anyone know of an easy way of translating a physical
address to virtual address.
The physical address is within some dma safe memory allocated with mmap*().
I know the virtual and physical base address when mmap*() is called. But
because of the architecture of the driver code the physical address is only
known at a later time. I know I can save the virtual and physical base
address and then use those two for converting into the virtual address, but
is there an easier way - similar to mem_offset() - just the other way?
Jens H Jorgensen <> jhj@remove-nospam-videk.com> > wrote:
I was wondering if anyone know of an easy way of translating a physical
address to virtual address.
Sorry, there’s no way aside from the obvious one of running through
all your virtual address doing mem_offset()'s and finding one that
matches.