Skip to contentSkip to conversation

powerpc: dump kernel log before carrying out fadump or kdump

PATCH Applied Ganesh Goudar 2 participants 2 messages Sep 4, 2019 – Sep 19, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc: dump kernel log before carrying out fadump or kdump

Since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path"), pstore dmesg file is not updated when dump is triggered from HMC. This commit modified system reset (sreset) handler to invoke fadump or kdump (if configured), without pushing dmesg to pstore. This leaves pstore to have old dmesg data which won't be much of a help if kdump fails to capture the dump. This patch fixes that by calling kmsg_dump() before heading to fadump ot kdump.

Fixes 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path")

---
V2: Rephrasing the commit message

---
 arch/powerpc/kernel/traps.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/traps.c +1 -0
index 11caa0291254..82f43535e686 100644
@@ -472,6 +472,7 @@ void system_reset_exception(struct pt_regs *regs)
 	if (debugger(regs))
 		goto out;
 
+	kmsg_dump(KMSG_DUMP_OOPS);
 	/*
 	 * A system reset is a request to dump, so we always send
 	 * it through the crashdump code (if fadump or kdump are
Signature · 1 line
2.17.2
#1 lore raw
Quoted 8 lines · Ganesh Goudar

Since commit 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path"), pstore dmesg file is not updated when dump is triggered from HMC. This commit modified system reset (sreset) handler to invoke fadump or kdump (if configured), without pushing dmesg to pstore. This leaves pstore to have old dmesg data which won't be much of a help if kdump fails to capture the dump. This patch fixes that by calling kmsg_dump() before heading to fadump ot kdump.

Quoted 4 lines
Fixes 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path")

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e7ca44ed3ba77fc26cf32650bb71584896662474

cheers