Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: loongarch: fix load command line segment error
@ 2024-05-20  1:45 Ming Wang
  2024-06-03 18:06 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Ming Wang @ 2024-05-20  1:45 UTC (permalink / raw)
  To: kexec; +Cc: horms, chenhuacai, gaojuxin

When kernel cmdline reserved multiple crash kernel segments, like:
"crashkernel=4G,high crashkernel=256M,low".
Cmdline segment may be loaded in locations larger than 4G of memory.
So the parameter 'buf_max' of add_buffer function should be
'hole_max'.

Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: Ming Wang <wangming01@loongson.cn>
---
 kexec/arch/loongarch/kexec-loongarch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/arch/loongarch/kexec-loongarch.c b/kexec/arch/loongarch/kexec-loongarch.c
index f00027c..ac75030 100644
--- a/kexec/arch/loongarch/kexec-loongarch.c
+++ b/kexec/arch/loongarch/kexec-loongarch.c
@@ -337,7 +337,7 @@ int loongarch_load_other_segments(struct kexec_info *info, unsigned long hole_mi
 	cmdline[sizeof(cmdline) - 1] = 0;
 	add_buffer(info, cmdline, sizeof(cmdline), sizeof(cmdline),
 		sizeof(void *), _ALIGN_UP(hole_min, getpagesize()),
-		0xffffffff, 1);
+		hole_max, 1);
 
 	dbgprintf("%s:%d: command_line: %s\n", __func__, __LINE__, cmdline);
 

base-commit: 2a3e54e9f734ce08dee20b4ff1bdd5037f1b0193
prerequisite-patch-id: 773329268ca8ca42f7b6aeafce0e83aceb75888d
-- 
2.39.2


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

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

end of thread, other threads:[~2024-06-03 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20  1:45 [PATCH] kexec: loongarch: fix load command line segment error Ming Wang
2024-06-03 18:06 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox