linux-yocto/arch/openrisc/kernel
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>
2024-08-29 17:30:39 +02:00
..
.gitignore
asm-offsets.c
dma.c
entry.S
head.S
irq.c
Makefile
module.c
or32_ksyms.c
process.c
prom.c
ptrace.c
setup.c
signal.c
smp.c
stacktrace.c
sync-timer.c
sys_call_table.c
time.c
traps.c
unwinder.c
vmlinux.h
vmlinux.lds.S