WSL2-Linux-Kernel/arch/openrisc
Oreoluwa Babatunde 537a6bf1c2 openrisc: Call setup_memory() earlier in the init sequence
[ Upstream commit 7b432bf376c9c198a7ff48f1ed14a14c0ffbe1fe ]

The unflatten_and_copy_device_tree() function contains a call to
memblock_alloc(). This means that memblock is allocating memory before
any of the reserved memory regions are set aside in the setup_memory()
function which calls early_init_fdt_scan_reserved_mem(). Therefore,
there is a possibility for memblock to allocate from any of the
reserved memory regions.

Hence, move the call to setup_memory() to be earlier in the init
sequence so that the reserved memory regions are set aside before any
allocations are done using memblock.

Signed-off-by: Oreoluwa Babatunde <quic_obabatun@quicinc.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-04 13:23:27 +02:00
..
boot openrisc/litex: Add ethernet device 2021-08-31 22:41:46 +09:00
configs openrisc/litex: Update defconfig 2021-08-31 22:41:46 +09:00
include openrisc: io: Define iounmap argument as volatile 2022-08-25 11:40:38 +02:00
kernel openrisc: Call setup_memory() earlier in the init sequence 2024-09-04 13:23:27 +02:00
lib openrisc: rename or32 code & comments to or1k 2021-08-05 10:53:59 +09:00
mm openrisc: io: Define iounmap argument as volatile 2022-08-25 11:40:38 +02:00
Kbuild openrisc: add arch/openrisc/Kbuild 2021-01-18 20:53:14 +09:00
Kconfig Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild 2021-05-26 23:10:37 +09:00