Kernel commits b741092d5976 ("powerpc/crash: add crash CPU hotplug support") and 849599b702ef ("powerpc/crash: add crash memory hotplug support") added crash CPU/Memory hotplug support on PowerPC. This patch extends that support for the kexec_load syscall. During CPU/Memory hotplug events on PowerPC, two kexec segments, elfcorehdr, and FDT, get updated by the kernel. To ensure the kernel can safely update these two kexec segments for the kdump image loaded using the kexec_load system call, the following changes are made: 1. Extra size is allocated for both elfcorehdr and FDT to accommodate additional resources in the future. For the elfcorehdr, the size hint is taken from /sys/kernel/crash_elfcorehdr_size sysfs, while for FDT, extra size is allocated to hold possible CPU nodes. 2. Both elfcorehdr and FDT are skipped from SHA calculation. Cc: Aditya Gupta <adityag@xxxxxxxxxxxxx> Cc: Baoquan He <bhe@xxxxxxxxxx> Cc: Coiby Xu <coxu@xxxxxxxxxx> Cc: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxx> Cc: Simon Horman <horms@xxxxxxxxxx> Acked-by: Hari Bathini <hbathini@xxxxxxxxxxxxx> Signed-off-by: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx> --- Changelog: