linux-mips-fnet
[Top] [All Lists]

Re: SGI/ARCS related fixes

To: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Subject: Re: SGI/ARCS related fixes
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Tue, 2 Jan 2001 19:12:57 +0100 (MET)
Cc: ralf@uni-koblenz.de, linux-mips@fnet.fr, linux-mips@oss.sgi.com
In-reply-to: <XFMail.001231124111.Harald.Koerfgen@home.ivm.de>
Organization: Technical University of Gdansk
On Sun, 31 Dec 2000, Harald Koerfgen wrote:

> wanting to bring my O2 patches up to date I stumbled over some minor hickups.
[...]
> --- /nfs/cvs/linux-2.3/linux/arch/mips/arc/memory.c     Mon Dec 11 18:07:34 
> 2000
> +++ linux/arch/mips/arc/memory.c        Sat Dec 30 21:49:32 2000
> @@ -124,7 +124,7 @@
>                 size = p->pages << PAGE_SHIFT;
>                 type = prom_memtype_classify(p->type);
>  
> -               add_memory_region(base, pages, type);
> +               add_memory_region(base, size, type);
>         }
>  }
>  

 That is fine.  I actually included the fix in my set of memory map
patches (patch-mips-2.4.0-test11-20001212-mem_map-37) I sent Ralf a few
days ago.  They still appear to wait to be applied.

> @@ -143,12 +143,13 @@
>                 addr = boot_mem_map.map[i].addr;
>                 while (addr < boot_mem_map.map[i].addr
>                               + boot_mem_map.map[i].size) {
> -                       ClearPageReserved(virt_to_page(__va(addr)));
> -                       set_page_count(virt_to_page(__va(addr)), 1);
> -                       free_page(__va(addr));
> +                       ClearPageReserved(virt_to_page(addr));
> +                       set_page_count(virt_to_page(addr), 1);
> +                       free_page(addr);
>                         addr += PAGE_SIZE;
>                         freed += PAGE_SIZE;
>                 }
>         }
>         printk("Freeing prom memory: %ldkb freed\n", freed >> 10);
>  }
> +

 That's probably incorrect.  These functions expect a virtual address
while "addr" is a physical address.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>