@@ -739,6 +739,13 @@
It will be ignored when crashkernel=X,high is not used
or memory reserved is below 4G.
+ kexeckernel=size[KMG][@offset[KMG]]
+ [KNL] Using kexec, Linux can reboot to a new kernel.
+ This parameter reserves the physical memory region
+ [offset, offset + size] for that kernel. If '@offset' is
+ omitted, then a suitable offset is selected
+ automatically.
+
cryptomgr.notests
[KNL] Disable crypto self-tests
@@ -74,5 +74,11 @@ int parse_crashkernel_high(char *cmdline, unsigned long long system_ram,
unsigned long long *crash_size, unsigned long long *crash_base);
int parse_crashkernel_low(char *cmdline, unsigned long long system_ram,
unsigned long long *crash_size, unsigned long long *crash_base);
+int parse_crash_or_kexec_kernel(char *cmdline,
+ unsigned long long system_ram,
+ unsigned long long *crash_size,
+ unsigned long long *crash_base,
+ const char *name,
+ const char *suffix);
#endif /* LINUX_CRASH_CORE_H */
@@ -224,12 +224,12 @@ static __init char *get_last_crashkernel(char *cmdline,
return ck_cmdline;
}
-static int __init __parse_crashkernel(char *cmdline,
- unsigned long long system_ram,
- unsigned long long *crash_size,
- unsigned long long *crash_base,
- const char *name,
- const char *suffix)
+int __init parse_crash_or_kexec_kernel(char *cmdline,
+ unsigned long long system_ram,
+ unsigned long long *crash_size,
+ unsigned long long *crash_base,
+ const char *name,
+ const char *suffix)
{
char *first_colon, *first_space;
char *ck_cmdline;
@@ -270,8 +270,9 @@ int __init parse_crashkernel(char *cmdline,
unsigned long long *crash_size,
unsigned long long *crash_base)
{
- return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
- "crashkernel=", NULL);
+ return parse_crash_or_kexec_kernel(cmdline, system_ram, crash_size,
+ crash_base, "crashkernel=",
+ NULL);
}
int __init parse_crashkernel_high(char *cmdline,
@@ -279,8 +280,9 @@ int __init parse_crashkernel_high(char *cmdline,
unsigned long long *crash_size,
unsigned long long *crash_base)
{
- return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
- "crashkernel=", suffix_tbl[SUFFIX_HIGH]);
+ return parse_crash_or_kexec_kernel(cmdline, system_ram, crash_size,
+ crash_base, "crashkernel=",
+ suffix_tbl[SUFFIX_HIGH]);
}
int __init parse_crashkernel_low(char *cmdline,
@@ -288,8 +290,9 @@ int __init parse_crashkernel_low(char *cmdline,
unsigned long long *crash_size,
unsigned long long *crash_base)
{
- return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
- "crashkernel=", suffix_tbl[SUFFIX_LOW]);
+ return parse_crash_or_kexec_kernel(cmdline, system_ram, crash_size,
+ crash_base, "crashkernel=",
+ suffix_tbl[SUFFIX_LOW]);
}
Elf_Word *append_elf_note(Elf_Word *buf, char *name, unsigned int type,
To reserve memory for normal kexec reboot, the new parameter: kexeckernel=size[KMG][@offset[KMG]] is used. Its syntax is the same as craskernel=, therefore they can use the same function to parse parameter settings. Rename: __parse_crashkernel() to parse_crash_or_kexec_kernel(), and make it public. Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> --- .../admin-guide/kernel-parameters.txt | 7 +++++ include/linux/crash_core.h | 6 +++++ kernel/crash_core.c | 27 ++++++++++--------- 3 files changed, 28 insertions(+), 12 deletions(-)