All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec-tools: mips: Fix the increased mem parameter size
@ 2021-03-17  3:45 Youling Tang
  2021-04-02  9:55 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Youling Tang @ 2021-03-17  3:45 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec, tangyouling

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>
---
 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 56b8fe8..aa09c83 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");
-- 
2.1.0


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kexec-tools: mips: Fix the increased mem parameter size
  2021-03-17  3:45 [PATCH] kexec-tools: mips: Fix the increased mem parameter size Youling Tang
@ 2021-04-02  9:55 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2021-04-02  9:55 UTC (permalink / raw)
  To: Youling Tang; +Cc: kexec

On Wed, Mar 17, 2021 at 11:45:14AM +0800, Youling Tang wrote:
> 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>

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-02  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17  3:45 [PATCH] kexec-tools: mips: Fix the increased mem parameter size Youling Tang
2021-04-02  9:55 ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.