[MIPS] Convert reference to mem_map to pfn_to_page().
authorRalf Baechle <ralf@linux-mips.org>
Sun, 4 Nov 2007 04:42:03 +0000 (04:42 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 15 Nov 2007 23:21:48 +0000 (23:21 +0000)
This was crashing the combination of highmem and sparsemem.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/init.c

index 110ee7656b41a9b1ee27057604c923213700e06d..ec3b9e9f30f4fd2ae5ad9edc9951564889eae58a 100644 (file)
@@ -426,7 +426,7 @@ void __init mem_init(void)
 
 #ifdef CONFIG_HIGHMEM
        for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) {
-               struct page *page = mem_map + tmp;
+               struct page *page = pfn_to_page(tmp);
 
                if (!page_is_ram(tmp)) {
                        SetPageReserved(page);