Fw: when to mark reserved low memory pages

Dave Hansen haveblue at us.ibm.com
Thu Sep 30 04:12:37 EST 2004


On Wed, 2004-09-29 at 09:26, Linda Xie wrote:
> Here is my final patch which will be submitted to redhat.

Might be nicer to do something like this instead of a whole bunch of
__va() operations.  page_to_pfn() is slightly lighter-weight than
virt_to_page() (doesn't really matter at init-time, though).  

start_pfn = rtas_rmo_buf >> PAGE_SHIFT;
end_pfn = (rtas_rmo_buf + RTAS_RMOBUF_MAX) >> PAGE_SHIFT;
for (pfn = start_pfn; pfn < end_pfn; pfn++)
        SetPageReserved(page_to_pfn(pfn));

-- 
Dave Hansen
haveblue at us.ibm.com




More information about the Linuxppc64-dev mailing list