]> www.infradead.org Git - users/dwmw2/linux.git/commit
of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify
authorUsama Arif <usamaarif642@gmail.com>
Wed, 23 Oct 2024 17:14:26 +0000 (18:14 +0100)
committerRob Herring (Arm) <robh@kernel.org>
Tue, 29 Oct 2024 20:32:45 +0000 (15:32 -0500)
commitb2473a359763e27567993e7d8f37de82f57a0829
tree1e7df6a84697a025a8636a9e7191b966ce0a9f5e
parentf9759e2b57049f9c4ea8d7254ba6afcf6eb10cd6
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>
21 files changed:
arch/arc/kernel/devtree.c
arch/arm/kernel/devtree.c
arch/arm64/kernel/setup.c
arch/csky/kernel/setup.c
arch/loongarch/kernel/setup.c
arch/microblaze/kernel/prom.c
arch/mips/kernel/prom.c
arch/mips/kernel/relocate.c
arch/nios2/kernel/prom.c
arch/openrisc/kernel/prom.c
arch/powerpc/kernel/dt_cpu_ftrs.c
arch/powerpc/kernel/prom.c
arch/powerpc/platforms/pseries/plpks.c
arch/riscv/kernel/setup.c
arch/sh/kernel/setup.c
arch/um/kernel/dtb.c
arch/x86/kernel/devicetree.c
arch/xtensa/kernel/setup.c
drivers/of/fdt.c
drivers/of/kexec.c
include/linux/of_fdt.h