identify a vitual address

Eli Cohen <eli-VPRAkNaXOzVS1MOuV/[email protected]>
Newsgroups gmane.linux.redhat.taroon
Message-ID <[email protected]>
Hi,
I have to implement a function that returns the physical address given the
virtual address. I use a method similar to follow_page() implementation. In
previous kernels I could distinguish kernel addresses from user space
addresses by checking if the address is higher or lower than PAGE_OFFSET and
for kernel space addresses I used init_mm's page tables while for user space
addresses I used the process's page tables. Now that the address space of
kernel and user can overlap my question is how to distinguish between them?
One more question. Why does follow_page() not exported? There are many
devices who do DMA and need this translation.

Thanks
Eli
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When the going gets tough the tough get going
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.