Once the kimage is prepared the only way to identify which kexec segment holds FDT is by looping through all kexec segments. To avoid this a new member "fdt_index" is added to kimage_arch struct. The new member holds the index of FDT segment in the kexec segment array which gives direct access to FDT segment. The fdt_index will be populated during kexec load for both kexec_load and kexec_file_load case. Signed-off-by: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx> --- arch/powerpc/include/asm/kexec.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h index c8040c93b15a..9489e5ca93fb 100644 --- a/arch/powerpc/include/asm/kexec.h +++ b/arch/powerpc/include/asm/kexec.h @@ -106,6 +106,9 @@ extern const struct kexec_file_ops kexec_elf64_ops; struct kimage_arch { struct crash_mem *exclude_ranges; +#if defined(CONFIG_HOTPLUG_CPU) + int fdt_index; +#endif unsigned long backup_start; void *backup_buf; void *fdt; -- 2.36.1 _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec