summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2021-03-17 11:45:14 +0800
committerSimon Horman <horms@verge.net.au>2021-04-02 11:55:30 +0200
commit84a6ef00376cc179eb555952b08d9bc5bfcfa67a (patch)
tree64dff5df481718a8b25812d31c7a839ff56a52ea
parentd73822b8985b68694336cd6a1aa47fe0233b55cc (diff)
downloadkexec-tools-84a6ef00376cc179eb555952b08d9bc5bfcfa67a.tar.gz
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 <tangyouling@loongson.cn> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/mips/crashdump-mips.c2
1 files changed, 1 insertions, 1 deletions
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");