I think there is no exported function for that, but there is a global variable for that. Reason being for performance - the action virt_to_phys() is a macro to be compiled inline and more details here:
On Wed, Sep 4, 2013 at 1:29 AM, ajay saini <ajay_saini1006@xxxxxxxxxxx> wrote:
More information :- Linux kernel version : 2.6.32 (But I would like a method which is portable to other higher versions as well)- I tried using follow_page, but this function is not exported from the kernel so, can't use it. (Any reason why this function is not exported??)
ThanksAjay
From: ajay saini <ajay_saini1006@xxxxxxxxxxx>
To: "kernelnewbies@xxxxxxxxxxxxxxxxx" <kernelnewbies@xxxxxxxxxxxxxxxxx>
Sent: Tuesday, 3 September 2013 1:21 PM
Subject: Getting struct page pointer from virtual address
Hey,I am working on a linux kernel module and I have a virtual address and mm (struct mm_struct) for a process in this module. I can find the virtaul memory area to which this address belongs to by using find_vma.Is there a function in the linux kernel which I can use in this module (i.e. exported from the kernel) to get struct page pointer for this virtual address.ThanksAjay
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Regards,
Peter Teoh
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies