summaryrefslogtreecommitdiffstats
path: root/arch/nios2
diff options
context:
space:
mode:
authorUsama Arif <usamaarif642@gmail.com>2024-10-23 19:14:26 +0200
committerRob Herring (Arm) <robh@kernel.org>2024-10-29 21:32:45 +0100
commitb2473a359763e27567993e7d8f37de82f57a0829 (patch)
tree1e7df6a84697a025a8636a9e7191b966ce0a9f5e /arch/nios2
parentdt-bindings: cache: qcom,llcc: Fix X1E80100 reg entries (diff)
downloadlinux-b2473a359763e27567993e7d8f37de82f57a0829.tar.xz
linux-b2473a359763e27567993e7d8f37de82f57a0829.zip
of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify
__pa() is only intended to be used for linear map addresses and using it for initial_boot_params which is in fixmap for arm64 will give an incorrect value. Hence save the physical address when it is known at boot time when calling early_init_dt_scan for arm64 and use it at kexec time instead of converting the virtual address using __pa(). Note that arm64 doesn't need the FDT region reserved in the DT as the kernel explicitly reserves the passed in FDT. Therefore, only a debug warning is fixed with this change. Reported-by: Breno Leitao <leitao@debian.org> Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Usama Arif <usamaarif642@gmail.com> Fixes: ac10be5cdbfa ("arm64: Use common of_kexec_alloc_and_setup_fdt()") Link: https://lore.kernel.org/r/20241023171426.452688-1-usamaarif642@gmail.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/kernel/prom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/nios2/kernel/prom.c b/arch/nios2/kernel/prom.c
index 9a8393e6b4a8..db049249766f 100644
--- a/arch/nios2/kernel/prom.c
+++ b/arch/nios2/kernel/prom.c
@@ -27,7 +27,7 @@ void __init early_init_devtree(void *params)
if (be32_to_cpup((__be32 *)CONFIG_NIOS2_DTB_PHYS_ADDR) ==
OF_DT_HEADER) {
params = (void *)CONFIG_NIOS2_DTB_PHYS_ADDR;
- early_init_dt_scan(params);
+ early_init_dt_scan(params, __pa(params));
return;
}
#endif
@@ -37,5 +37,5 @@ void __init early_init_devtree(void *params)
params = (void *)__dtb_start;
#endif
- early_init_dt_scan(params);
+ early_init_dt_scan(params, __pa(params));
}