Fw: when to mark reserved low memory pages

Linda Xie lxie at us.ibm.com
Thu Sep 30 02:26:20 EST 2004





Here is my final patch which will be submitted to redhat.

-Linda

diff -purN linux-2.6.8/arch/ppc64/mm/init.c
linux-2.6.8-linda/arch/ppc64/mm/init.c
--- linux-2.6.8/arch/ppc64/mm/init.c      1970-05-10 22:51:47.153000776
-0400
+++ linux-2.6.8-linda/arch/ppc64/mm/init.c      1970-05-10
23:36:33.774957608 -0400
@@ -706,7 +706,7 @@ void __init mem_init(void)
      int nid;
 #endif
      pg_data_t *pgdat;
-     unsigned long i;
+     unsigned long i, addr;
      struct page *page;
      unsigned long reservedpages = 0, codesize, initsize, datasize,
bsssize;

@@ -749,8 +749,22 @@ void __init mem_init(void)
            bsssize >> 10,
            initsize >> 10);

+     /* Mark the RTAS pages as PG_reserved */
+     for (addr = (unsigned long)__va(rtas_rmo_buf);
+           addr < PAGE_ALIGN((unsigned long)__va(rtas_rmo_buf) +
RTAS_RMOBUF_MAX);
+           addr += PAGE_SIZE) {
+                 SetPageReserved(virt_to_page(addr));
+     }
+
      mem_init_done = 1;

+
 #ifdef CONFIG_PPC_ISERIES
      iommu_vio_init();
 #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20040929/20b3fe7d/attachment.htm 


More information about the Linuxppc64-dev mailing list