Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b4bde02e authored by Oreoluwa Babatunde's avatar Oreoluwa Babatunde Committed by Greg Kroah-Hartman
Browse files

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: default avatarOreoluwa Babatunde <quic_obabatun@quicinc.com>
Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d8086fba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment