All of lore.kernel.org
 help / color / mirror / Atom feed
* powerpc/kexec_file: print configured kernel command line
@ 2025-07-25 12:44 Sourabh Jain
  2026-07-10  3:40 ` Ritesh Harjani
  2026-07-10  7:05 ` Mukesh Kumar Chaurasiya
  0 siblings, 2 replies; 3+ messages in thread
From: Sourabh Jain @ 2025-07-25 12:44 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Sourabh Jain, Madhavan Srinivasan, Michael Ellerman

Kexec with the -d option prints extra logs about the kexec/kdump kernel
that help debug kexec and kdump. For example, it shows what kexec
segments are loaded, their locations, and sizes.

One key piece of information still missing is the kernel command line
configured for the kexec/kdump kernel.

With this patch included, the kernel will print the kernel command line
configured for the kexec/kdump kernel as shown below:

kexec --initrd=./initrd ./kernel -lspd --command-line="test1 test2"

Loaded elf core header at 0x22e30000, bufsz=0x2000 memsz=0x80000
kexec_elf: Command line: elfcorehdr=0x22e30000 test1 test2   <--- New
kexec_elf: Loaded initrd at 0x22eb0000

Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
 arch/powerpc/kexec/elf_64.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/kexec/elf_64.c b/arch/powerpc/kexec/elf_64.c
index 5d6d616404cf..db0af790c784 100644
--- a/arch/powerpc/kexec/elf_64.c
+++ b/arch/powerpc/kexec/elf_64.c
@@ -90,6 +90,8 @@ static void *elf64_load(struct kimage *image, char *kernel_buf,
 		cmdline = modified_cmdline;
 	}
 
+	kexec_dprintk("Command line: %s", cmdline ? cmdline : "");
+
 	if (initrd != NULL) {
 		kbuf.buffer = initrd;
 		kbuf.bufsz = kbuf.memsz = initrd_len;
-- 
2.50.1



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

end of thread, other threads:[~2026-07-10  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 12:44 powerpc/kexec_file: print configured kernel command line Sourabh Jain
2026-07-10  3:40 ` Ritesh Harjani
2026-07-10  7:05 ` Mukesh Kumar Chaurasiya

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.