aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kexec.h
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2020-07-29 17:10:16 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2020-07-29 23:47:53 +1000
commitb8e55a3e5c208862eacded5aad822184f89f85d9 (patch)
treee90ba99f2146c60a94aeb7efff07e7655f88ad70 /arch/powerpc/include/asm/kexec.h
parentpowerpc/kexec_file: Add helper functions for getting memory ranges (diff)
downloadlinux-dev-b8e55a3e5c208862eacded5aad822184f89f85d9.tar.xz
linux-dev-b8e55a3e5c208862eacded5aad822184f89f85d9.zip
powerpc/kexec_file: Avoid stomping memory used by special regions
crashkernel region could have an overlap with special memory regions like OPAL, RTAS, TCE table & such. These regions are referred to as excluded memory ranges. Setup these ranges during image probe in order to avoid them while finding the buffer for different kdump segments. Override arch_kexec_locate_mem_hole() to locate a memory hole taking these ranges into account. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/159602281047.575379.6636807148335160795.stgit@hbathini
Diffstat (limited to 'arch/powerpc/include/asm/kexec.h')
-rw-r--r--arch/powerpc/include/asm/kexec.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/kexec.h b/arch/powerpc/include/asm/kexec.h
index 9b3feef55aaa..639f31e13593 100644
--- a/arch/powerpc/include/asm/kexec.h
+++ b/arch/powerpc/include/asm/kexec.h
@@ -100,14 +100,16 @@ void relocate_new_kernel(unsigned long indirection_page, unsigned long reboot_co
#ifdef CONFIG_KEXEC_FILE
extern const struct kexec_file_ops kexec_elf64_ops;
-#ifdef CONFIG_IMA_KEXEC
#define ARCH_HAS_KIMAGE_ARCH
struct kimage_arch {
+ struct crash_mem *exclude_ranges;
+
+#ifdef CONFIG_IMA_KEXEC
phys_addr_t ima_buffer_addr;
size_t ima_buffer_size;
-};
#endif
+};
int setup_purgatory(struct kimage *image, const void *slave_code,
const void *fdt, unsigned long kernel_load_addr,
@@ -125,6 +127,7 @@ int setup_new_fdt_ppc64(const struct kimage *image, void *fdt,
unsigned long initrd_load_addr,
unsigned long initrd_len, const char *cmdline);
#endif /* CONFIG_PPC64 */
+
#endif /* CONFIG_KEXEC_FILE */
#else /* !CONFIG_KEXEC_CORE */