linux/arch/openrisc
Oreoluwa Babatunde 66efa11a43 openrisc: Call setup_memory() earlier in the init sequence
[ Upstream commit 7b432bf376 ]

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>
History 2024-08-29 17:30:39 +02:00
..
boot kbuild: do not quote string values in include/config/auto.conf 2022-01-08 18:03:57 +09:00
configs openrisc: Add virt defconfig 2022-07-30 05:50:15 +09:00
include kernel: exit: cleanup release_thread() 2022-09-11 21:55:07 -07:00
kernel openrisc: Call setup_memory() earlier in the init sequence 2024-08-29 17:30:39 +02:00
lib openrisc/delay: Add include to fix symbol not declared warning 2022-05-23 17:15:49 +09:00
mm mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig openrisc: Add pci bus support 2022-07-30 05:50:15 +09:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00