Re: remap_pte_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- "Raghu R. Arur" <rra2002@aria.ncl.cs.columbia.edu>
wrote:
> 
>  Hi,
> 
>    I am trying to understand remap_pte_range in 2.4.19
> kernel. The name of the function and the comment suggests

> that a range of pte are cleared and set to new pages. 

The function name is a little misleading. In fact, in the 
current 2.5.x kernel, it doesn't even clear the old pte. 
The old pte should be cleared before calling 
remap_pte_range.

> But the code just clears the ptes and does not set the 
> pte entry to a new page. 

Not exactly. It does set the pte in some cases:

>	page = virt_to_page(__va(phys_addr));
> 	if ((!VALID_PAGE(page)) || PageReserved(page))
>  		set_pte(pte, mk_pte_phys(phys_addr, prot));
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In all other cases, the page fault handler will set the
correct pte.

-Ravi.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux