diff options
author | Serge Semin <fancer.lancer@gmail.com> | 2019-05-03 13:50:41 -0400 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2019-05-05 23:12:20 -0400 |
commit | 3751cbda8f223549d7ea28803cbec8ac87e43ed2 (patch) | |
tree | df4752334d7dbb33d9cf48bf2d08a19265bea1a3 | |
parent | 93fa5b280761a4dbb14c5330f260380385ab2b49 (diff) |
mips: Manually call fdt_init_reserved_mem() method
Since memblock-patchset was introduced the reserved-memory nodes are
supported being declared in dt-files. So these nodes are actually parsed
during the arch setup procedure when the early_init_fdt_scan_reserved_mem()
method is called. But due to the arch-specific boot mem_map container
utilization we need to manually call the fdt_init_reserved_mem() method
after all the available and reserved memory has been moved to memblock.
The first function call performed before bootmem_init() by the
early_init_fdt_scan_reserved_mem() routine fails due to the lack of any
memblock memory regions to allocate from at that stage.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
-rw-r--r-- | arch/mips/kernel/setup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index fbd216b4e929..ab349d2381c3 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/dma-contiguous.h> | 27 | #include <linux/dma-contiguous.h> |
28 | #include <linux/decompress/generic.h> | 28 | #include <linux/decompress/generic.h> |
29 | #include <linux/of_fdt.h> | 29 | #include <linux/of_fdt.h> |
30 | #include <linux/of_reserved_mem.h> | ||
30 | 31 | ||
31 | #include <asm/addrspace.h> | 32 | #include <asm/addrspace.h> |
32 | #include <asm/bootinfo.h> | 33 | #include <asm/bootinfo.h> |
@@ -825,6 +826,8 @@ static void __init arch_mem_init(char **cmdline_p) | |||
825 | memblock_reserve(__pa_symbol(&__nosave_begin), | 826 | memblock_reserve(__pa_symbol(&__nosave_begin), |
826 | __pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin)); | 827 | __pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin)); |
827 | 828 | ||
829 | fdt_init_reserved_mem(); | ||
830 | |||
828 | memblock_dump_all(); | 831 | memblock_dump_all(); |
829 | 832 | ||
830 | early_memtest(PFN_PHYS(min_low_pfn), PFN_PHYS(max_low_pfn)); | 833 | early_memtest(PFN_PHYS(min_low_pfn), PFN_PHYS(max_low_pfn)); |