On 01/31/25 at 05:08pm, Sourabh Jain wrote:
Although the crashkernel area is reserved, on architectures likeLGTM,
PowerPC, it is possible for the crashkernel reserved area to contain
components like RTAS, TCE, OPAL, etc. To avoid placing kexec segments
over these components, PowerPC has its own set of APIs to locate holes
in the crashkernel reserved area.
Add an arch hook in the generic locate mem hole APIs so that
architectures can handle such special regions in the crashkernel area
while locating memory holes for kexec segments using generic APIs.
With this, a lot of redundant arch-specific code can be removed, as it
performs the exact same job as the generic APIs.
To keep the generic and arch-specific changes separate, the changes
related to moving PowerPC to use the generic APIs and the removal of
PowerPC-specific APIs for memory hole allocation are done in a
subsequent patch titled "powerpc/crash: Use generic APIs to locate
memory hole for kdump.
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Baoquan he <bhe@xxxxxxxxxx>
Cc: Hari Bathini <hbathini@xxxxxxxxxxxxx>
Cc: Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>
Cc: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxx>
Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
Cc: kexec@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx>
---
include/linux/kexec.h | 9 +++++++++
kernel/kexec_file.c | 12 ++++++++++++
2 files changed, 21 insertions(+)
Acked-by: Baoquan He <bhe@xxxxxxxxxx>