OpenCloudOS-Kernel/arch/openrisc/kernel
Oreoluwa Babatunde 7ad21517c3 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-08-29 17:33:39 +02:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
asm-offsets.c sched,arch: Remove unused TASK_STATE offsets 2021-06-18 11:43:09 +02:00
dma.c openrisc: Fix pagewalk usage in arch_dma_{clear, set}_uncached 2022-10-08 06:11:29 +01:00
entry.S openrisc: Support floating point user api 2023-04-26 15:08:06 +01:00
head.S openrisc: Support floating point user api 2023-04-26 15:08:06 +01:00
irq.c irq: openrisc: perform irqentry in entry code 2021-10-26 10:13:28 +01:00
module.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
or32_ksyms.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
process.c openrisc: Include cpu.h and switch_to.h for prototypes 2023-08-21 08:15:25 +01:00
prom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ptrace.c openrisc: Add missing prototypes for assembly called fnctions 2023-08-21 08:11:54 +01:00
setup.c openrisc: Call setup_memory() earlier in the init sequence 2024-08-29 17:33:39 +02:00
signal.c openrisc: Declare do_signal function as static 2023-08-21 08:12:11 +01:00
smp.c openrisc: Add missing prototypes for assembly called fnctions 2023-08-21 08:11:54 +01:00
stacktrace.c openrisc: Fix oops caused when dumping stack 2020-08-04 10:59:45 +09:00
sync-timer.c openrisc: add tick timer multi-core sync logic 2017-11-03 14:01:16 +09:00
sys_call_table.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
time.c openrisc: Add missing prototypes for assembly called fnctions 2023-08-21 08:11:54 +01:00
traps.c openrisc: traps: Don't send signals to kernel mode threads 2024-06-12 11:11:42 +02:00
unwinder.c openrisc: unwinder: Fix grammar issue in comment 2022-06-28 17:31:24 +09:00
vmlinux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00