linux-mips
[Top] [All Lists]

Re: [MIPS] 64-bit Sibyte kernels need DMA32.

To: linux-mips@linux-mips.org
Subject: Re: [MIPS] 64-bit Sibyte kernels need DMA32.
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 08 Jan 2008 00:41:13 +0900 (JST)
Cc: ralf@linux-mips.org
In-reply-to: <20071228.014321.41630007.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <S20038938AbXKZMRu/20071126121750Z+44508@ftp.linux-mips.org> <20071228.014321.41630007.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 28 Dec 2007 01:43:21 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> 
wrote:
> This commit breaks platforms which have real prom_free_prom_memory().
> ...
> If I reverted the commit, this crash does not happen.  How I can fix this?

I see malta disabled prom_free_prom_memory for now, but it seems some
other boards are affected by this problem too.

How about this fix?

diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 7f6ddcb..f8a535a 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -269,7 +269,7 @@ static void __init bootmem_init(void)
 
 static void __init bootmem_init(void)
 {
-       unsigned long init_begin, reserved_end;
+       unsigned long reserved_end;
        unsigned long mapstart = ~0UL;
        unsigned long bootmap_size;
        int i;
@@ -344,7 +344,6 @@ static void __init bootmem_init(void)
                                         min_low_pfn, max_low_pfn);
 
 
-       init_begin = PFN_UP(__pa_symbol(&__init_begin));
        for (i = 0; i < boot_mem_map.nr_map; i++) {
                unsigned long start, end;
 
@@ -352,8 +351,8 @@ static void __init bootmem_init(void)
                end = PFN_DOWN(boot_mem_map.map[i].addr
                                + boot_mem_map.map[i].size);
 
-               if (start <= init_begin)
-                       start = init_begin;
+               if (start <= min_low_pfn)
+                       start = min_low_pfn;
                if (start >= end)
                        continue;
 

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