kmap is a kernel function which takes in the parameter struct page pointer and returns kernel virtual address.
On a typical x86 machine with 1GB RAM, kmap works like this.
If the struct page is associated with the physical page less than 896 MB, then kmap simply adds the PAGE_OFFSET - 0xC0000000 to the physical address (VA = PA + PAGE_OFFSET) and returns , because in a typcial 3G/1G partition of the linear virtual address space, first 896MB of the kernel virtual address is directly mapped to the physical address. I
If the struct page is associated with physical page in the HIGHMEM region i.e. > 896 MB, then it will map this physical page to the kernel virtual address, generally named vmalloc address region or non-contiguous address region and then returns this virtual address
Regards,
Prabhu
On Fri, Oct 1, 2010 at 11:22 AM, Sengottuvelan S <sengottuvelan.s@xxxxxxxxx> wrote:
HiI am new to this forum. I have specific quesion on "kmap" and "page". I would like to know how these two are related to eachother.Thanks in advance.