Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: Add support for reserved memory defined by DT

In DT reserved memory nodes can be added as is described by
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
but Microblaze didn't have a support for it. The similar change was done
for ARC by commit 1b10cb21d888 ("ARC: add support for reserved memory
defined by device tree"). It is pretty much enough to call
early_init_fdt_scan_reserved_mem().
Microblaze is not using initial_boot_params that's why there is no need to
call early_init_fdt_reserve_self().

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/da4395776bf0de7207767abcc8a5df05bf411816.1645795048.git.michal.simek@xilinx.com

+3
+3
arch/microblaze/mm/init.c
··· 13 13 #include <linux/kernel.h> 14 14 #include <linux/mm.h> /* mem_init */ 15 15 #include <linux/initrd.h> 16 + #include <linux/of_fdt.h> 16 17 #include <linux/pagemap.h> 17 18 #include <linux/pfn.h> 18 19 #include <linux/slab.h> ··· 261 260 memblock_set_current_limit(memory_start + lowmem_size - 1); 262 261 263 262 parse_early_param(); 263 + 264 + early_init_fdt_scan_reserved_mem(); 264 265 265 266 /* CMA initialization */ 266 267 dma_contiguous_reserve(memory_start + lowmem_size - 1);