AmpereComputing / ampere-lts-kernel---DEPRECATED

Linux 5.4 and 5.10 Longterm kernel (LTS) with Ampere patches
20 stars 17 forks source link

[NOUPSTREAM]support reserving crashkernel above 4G to 5.4 kernel #102

Open adamliyi opened 2 years ago

adamliyi commented 2 years ago

The patches has been backported to 5.10 kernel. We need to backported to 5.4 kernel.

5.10 kernel patches: https://github.com/AmpereComputing/ampere-lts-kernel/issues/94

adamliyi commented 2 years ago

Backport bellow patch to 5.4 kernel: Enable kexec_file_load: 40e94ab32e4f arm64: kexec_file: add crash dump support 887436bdb7b2 libfdt: include fdt_addresses.c

Enable crashkernel above 4GB: Not Upstream 696027f1094e arm64: kdump: remove dependency on arm64_dma32_phys_limit c25bff82cdc5 kdump: update Documentation about crashkernel a9878d3a393b arm64: kdump: add memory for devices by DT property linux,usable-memory-range 38090048f333 x86, arm64: Add ARCH_WANT_RESERVE_CRASH_KERNEL config f7dc3443d080 arm64: kdump: reimplement crashkernel=X b51c6d317108 arm64: kdump: introduce some macroes for crash kernel reservation c44105f8770e x86/elf: Move vmcore_elf_check_arch_cross to arch/x86/include/asm/elf.h 81d660bccfc8 x86: kdump: move reserve_crashkernel[_low]() into crash_core.c d809859aaa89 x86: kdump: move xen_pv_domain() check and insert_resource() to setup_arch() ee87ad4822c6 x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel() 85e1a398c735 x86: kdump: make the lower bound of crash kernel reservation consistent 9c28f0a5a1f6 x86: kdump: replace the hard-coded alignment with macro CRASH_ALIGN

Also, we need to enable KEXEC_FILE in kernel configure, the make kexec_tool work properly:

--- a/arch/arm64/configs/altra_5.4_defconfig
+++ b/arch/arm64/configs/altra_5.4_defconfig
@@ -64,6 +64,7 @@ CONFIG_HZ_100=y
 CONFIG_SECCOMP=y
 CONFIG_PARAVIRT_TIME_ACCOUNTING=y
 CONFIG_KEXEC=y
+CONFIG_KEXEC_FILE=y
 CONFIG_CRASH_DUMP=y
 CONFIG_ARM64_PMEM=y
 CONFIG_ARM64_PSEUDO_NMI=y