]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MIPS: Fix start of free memory when using initrd
authorGreg Ungerer <gerg@snapgear.com>
Wed, 8 Sep 2010 05:50:43 +0000 (15:50 +1000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 18 Sep 2013 20:29:48 +0000 (22:29 +0200)
commit37202ec88b1856e5de9f563480080cc665ea5873
tree82adf96c04e71158944f0986f6fc709eb9ad14a1
parentdac9b396b6c1b2c608ea1ec09973af4626475151
MIPS: Fix start of free memory when using initrd

Currently when using an initrd on a MIPS system the start of the bootmem region of
memory is set to the larger of the end of the kernel bss region (_end) or the end
of the initrd. In a typical memory layout where the initrd is at some address above
the kernel image this means that the start of the bootmem region will be the end of
the initrd. But when we are done processing/loading the initrd we have no way to
reclaim the memory region it occupied, and we lose a large chunk of now otherwise
empty RAM from our final running system.

The bootmem code is designed to allow this initrd to be reserved (and the code in
finalize_initrd() currently does this). When the initrd is finally processed/loaded
its reserved memory is freed.

Fix the setting of the start of the bootmem map to be the end of the kernel.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1574/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/setup.c