linux-stable/arch/nios2/kernel
Guenter Roeck de164a7f19 nios2: Only use built-in devicetree blob if configured to do so
Starting with commit 7b937cc243 ("of: Create of_root if no dtb provided
by firmware"), attempts to boot nios2 images with an external devicetree
blob result in a crash.

Kernel panic - not syncing: early_init_dt_alloc_memory_arch:
	Failed to allocate 72 bytes align=0x40

For nios2, a built-in devicetree blob always overrides devicetree blobs
provided by ROMMON/BIOS. This includes the new dummy devicetree blob.
Result is that the dummy devicetree blob is used even if an external
devicetree blob is provided. Since the dummy devicetree blob does not
include any memory information, memory allocations fail, resulting in
the crash.

To fix the problem, only use the built-in devicetree blob if
CONFIG_NIOS2_DTB_SOURCE_BOOL is enabled.

Fixes: 7b937cc243 ("of: Create of_root if no dtb provided by firmware")
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240322065419.162416-1-linux@roeck-us.net
Signed-off-by: Rob Herring <robh@kernel.org>
2024-04-03 14:35:53 -05: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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
cpuinfo.c nios2: Replace all non-returning strlcpy with strscpy 2023-06-13 16:51:49 -05:00
entry.S nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
head.S
insnemu.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
irq.c nios2: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
kgdb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
misaligned.c nios2: remove unused statistic counters 2015-09-08 01:32:34 +08:00
module.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
nios2_ksyms.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
prom.c nios2: Only use built-in devicetree blob if configured to do so 2024-04-03 14:35:53 -05:00
ptrace.c nios2: ptrace: user_regset_copyin_ignore() always returns 0 2022-11-15 14:30:40 -08:00
setup.c vgacon, arch/*: remove unused screen_info definitions 2023-10-17 10:17:02 +02:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-15 11:25:32 -05:00
sys_nios2.c Take mmap lock in cacheflush syscall 2021-02-19 15:01:59 +08:00
syscall_table.c nios2: don't leave NULLs in sys_call_table[] 2022-08-15 11:25:32 -05:00
time.c nios2: Convert to using %pOFn instead of device_node.name 2018-09-28 16:39:27 -05:00
traps.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
vmlinux.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00