linux-mips
[Top] [All Lists]

[PATCH] Fix potential SPARSEMEM bug

To: linux-mips@linux-mips.org
Subject: [PATCH] Fix potential SPARSEMEM bug
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Wed, 21 Mar 2007 00:56:28 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
The first pfn of zones should be min_low_pfn, not 0.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index f08ae71..25abe91 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -377,7 +377,7 @@ void __init paging_init(void)
 #ifdef CONFIG_FLATMEM
        free_area_init(zones_size);
 #else
-       pfn = 0;
+       pfn = min_low_pfn;
        for (i = 0; i < MAX_NR_ZONES; i++)
                for (j = 0; j < zones_size[i]; j++, pfn++)
                        if (!page_is_ram(pfn))

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