summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSourabh Jain <sourabhjain@linux.ibm.com>2025-07-25 18:14:38 +0530
committerMadhavan Srinivasan <maddy@linux.ibm.com>2026-09-10 13:15:26 +0530
commite58b9d90973e09f1908d2cd00ca2336a8232b9f8 (patch)
tree1056b57eb765f00a0fa8016919fa9211cecaea6a
parent1144454ea22290d7c6998a2af6239e5995476afc (diff)
downloadlinux-next-e58b9d90973e09f1908d2cd00ca2336a8232b9f8.tar.gz
linux-next-e58b9d90973e09f1908d2cd00ca2336a8232b9f8.zip
powerpc/kexec_file: print configured kernel command line
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 Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com> Tested-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250725124438.327593-1-sourabhjain@linux.ibm.com
-rw-r--r--arch/powerpc/kexec/elf_64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kexec/elf_64.c b/arch/powerpc/kexec/elf_64.c
index ea50a072debf..d9a466cd602e 100644
--- a/arch/powerpc/kexec/elf_64.c
+++ b/arch/powerpc/kexec/elf_64.c
@@ -94,6 +94,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;