Fw: when to mark reserved low memory pages

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Sep 30 09:08:09 EST 2004


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

can you resend it not broken by your mailer ? that is not in html
form and not wrapped ? thanks.

Ben.

> -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
-- 
Benjamin Herrenschmidt <benh at kernel.crashing.org>




More information about the Linuxppc64-dev mailing list