From 84a6ef00376cc179eb555952b08d9bc5bfcfa67a Mon Sep 17 00:00:00 2001 From: Youling Tang Date: Wed, 17 Mar 2021 11:45:14 +0800 Subject: mips: Fix the increased mem parameter size The added "mem=size@start" parameter actually corresponds to "crashkernel=YM@XM", but 1 byte is missing when calculating the size, so 1 byte should be added. For example, when using crashkernel=108M@64M (110592K@65536K): Without this patch: the mem parameter added is: mem=110591K@65536K With this patch: the mem parameter added is: mem=110592K@65536K Fixes: 0eac64052636 ("kexec: mips: Fix mem parameters") Signed-off-by: Youling Tang Signed-off-by: Simon Horman --- kexec/arch/mips/crashdump-mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c index 56b8fe8b..aa09c83c 100644 --- a/kexec/arch/mips/crashdump-mips.c +++ b/kexec/arch/mips/crashdump-mips.c @@ -401,7 +401,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline, * kernel's available memory */ cmdline_add_mem(mod_cmdline, crash_reserved_mem.start, - crash_reserved_mem.end - crash_reserved_mem.start); + crash_reserved_mem.end - crash_reserved_mem.start + 1); cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr); dbgprintf("CRASH MEMORY RANGES:\n"); -- cgit 1.2.3-korg