aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/setup.c
diff options
context:
space:
mode:
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>2016-11-23 14:43:46 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-03 16:34:45 +0100
commit73346081cac18732a959be580a90abc707dea52a (patch)
treef667794b02a7f315ed63aa9613a4f5bceb29a2d2 /arch/mips/kernel/setup.c
parentMIPS: init: Ensure bootmem does not corrupt reserved memory (diff)
downloadlinux-dev-73346081cac18732a959be580a90abc707dea52a.tar.xz
linux-dev-73346081cac18732a959be580a90abc707dea52a.zip
MIPS: Use early_init_fdt_reserve_self to protect DTB location
early_init_fdt_reserve_self is used to tell the boot memory allocator that a memory is occupied by the DTB, so add it in the MIPS init code to ensure information about the DTB is added to the boot memory array. Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14610/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r--arch/mips/kernel/setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 64b38d400987..c22f0fdd4cfb 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -27,6 +27,7 @@
#include <linux/device.h>
#include <linux/dma-contiguous.h>
#include <linux/decompress/generic.h>
+#include <linux/of_fdt.h>
#include <asm/addrspace.h>
#include <asm/bootinfo.h>
@@ -832,6 +833,9 @@ static void __init arch_mem_init(char **cmdline_p)
print_memory_map();
}
+ early_init_fdt_reserve_self();
+ early_init_fdt_scan_reserved_mem();
+
bootmem_init();
#ifdef CONFIG_PROC_VMCORE
if (setup_elfcorehdr && setup_elfcorehdr_size) {