linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: fix mapstart when using initrd

To: Ashok Kumar <ashoks@broadcom.com>
Subject: Re: [PATCH] MIPS: fix mapstart when using initrd
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 7 Oct 2013 18:08:21 +0200
Cc: linux-mips@linux-mips.org, gerg@uclinux.org
In-reply-to: <1379945426-32205-1-git-send-email-ashoks@broadcom.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1379945426-32205-1-git-send-email-ashoks@broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Sep 23, 2013 at 07:40:26PM +0530, Ashok Kumar wrote:
> Date:   Mon, 23 Sep 2013 19:40:26 +0530
> From: Ashok Kumar <ashoks@broadcom.com>
> To: linux-mips@linux-mips.org, gerg@uclinux.org
> cc: ralf@linux-mips.org, Ashok Kumar <ashoks@broadcom.com>
> Subject: [PATCH] MIPS: fix mapstart when using initrd
> Content-Type: text/plain
> 
> When initrd is present in the PFN right after the _end, bootmem
> bitmap(mapstart) overwrites it. So check for initrd_end in
> mapstart calculation.
> 
> Signed-off-by: Ashok Kumar <ashoks@broadcom.com>
> ---
> This is seen after the commit
> "mips: fix start of free memory when using initrd"
> in git://git.linux-mips.org/pub/scm/ralf/upstream-sfr.git branch
> 
> Tested the image on MIPS platform creating the above
> said scenario and initrd was corrupted.

And it gloriously breaks the build if CONFIG_BLK_DEV_INITRD is disabled.
Now most configurations will fail with something like:

[...]
  LD      vmlinux
arch/mips/built-in.o: In function `setup_arch':
(.init.text+0xff8): undefined reference to `initrd_end'
arch/mips/built-in.o: In function `setup_arch':
(.init.text+0xffc): undefined reference to `initrd_end'
make[2]: *** [vmlinux] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/home/ralf/src/linux/obj/lasat-build'

  Ralf

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