Skip to content

Commit 3751cbd

Browse files
fancerpaulburton
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: Mike Rapoport <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Serge Semin <[email protected]> Cc: [email protected] Cc: [email protected]
1 parent 93fa5b2 commit 3751cbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/mips/kernel/setup.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/dma-contiguous.h>
2828
#include <linux/decompress/generic.h>
2929
#include <linux/of_fdt.h>
30+
#include <linux/of_reserved_mem.h>
3031

3132
#include <asm/addrspace.h>
3233
#include <asm/bootinfo.h>
@@ -825,6 +826,8 @@ static void __init arch_mem_init(char **cmdline_p)
825826
memblock_reserve(__pa_symbol(&__nosave_begin),
826827
__pa_symbol(&__nosave_end) - __pa_symbol(&__nosave_begin));
827828

829+
fdt_init_reserved_mem();
830+
828831
memblock_dump_all();
829832

830833
early_memtest(PFN_PHYS(min_low_pfn), PFN_PHYS(max_low_pfn));

0 commit comments

Comments
 (0)