crash_core-add-generic-function-to-do-reservation.patch removed from -mm tree
The quilt patch titled
Subject: crash_core: add generic function to do reservation
has been removed from the -mm tree. Its filename was
crash_core-add-generic-function-to-do-reservation.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Baoquan He <[email protected]>
Subject: crash_core: add generic function to do reservation
Date: Thu, 14 Sep 2023 11:31:37 +0800
In architecture like x86_64, arm64 and riscv, they have vast virtual address space and usually have huge physical memory RAM. Their crashkernel reservation doesn't have to be limited under 4G RAM, but can be extended to the whole physical memory via crashkernel=,high support.
Now add function reserve_crashkernel_generic() to reserve crashkernel memory if users specify any case of kernel pamameters, like crashkernel=xM[@offset] or crashkernel=,high|low.
This is preparation to simplify code of crashkernel=,high support in architecutures.
---
include/linux/crash_core.h | 28 +++++++++ kernel/crash_core.c | 107 ++++++++++++++++++++++++++++++++++- 2 files changed, 134 insertions(+), 1 deletion(-)
include/linux/crash_core.h renamed from include/linux/crash_core.h~crash_core-add-generic-function-to-do-reservation +28 -0
@@ -93,6 +93,34 @@ int parse_crashkernel_high(char *cmdlineint parse_crashkernel_low (char *cmdline,unsigned long long system_ram,unsigned long long *crash_size,unsigned long long *crash_base); +#ifdef CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION +#ifndef DEFAULT_CRASH_KERNEL_LOW_SIZE +#define DEFAULT_CRASH_KERNEL_LOW_SIZE (128UL << 20) +#endif +#ifndef CRASH_ALIGN +#define CRASH_ALIGN SZ_2M +#endif +#ifndef CRASH_ADDR_LOW_MAX +#define CRASH_ADDR_LOW_MAX SZ_4G +#endif +#ifndef CRASH_ADDR_HIGH_MAX +#define CRASH_ADDR_HIGH_MAX memblock_end_of_DRAM() +#endif + +void __init reserve_crashkernel_generic (char *cmdline, +unsigned long long crash_size, +unsigned long long crash_base, +unsigned long long crash_low_size, +bool high); +#else +static inline void __init reserve_crashkernel_generic (char *cmdline, +unsigned long long crash_size, +unsigned long long crash_base, +unsigned long long crash_low_size, +bool high) +{} +#endif +/* Alignment required for elf header segment */ #define ELF_CORE_HEADER_ALIGN 4096
kernel/crash_core.c renamed from kernel/crash_core.c~crash_core-add-generic-function-to-do-reservation +106 -1
125 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are