linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: dump kernel log before carrying out fadump or kdump
@ 2019-08-22  6:31 Ganesh Goudar
  2019-08-27 10:12 ` Nicholas Piggin
  0 siblings, 1 reply; 2+ messages in thread
From: Ganesh Goudar @ 2019-08-22  6:31 UTC (permalink / raw)
  To: mpe, linuxppc-dev; +Cc: mahesh

Die or panic path in system reset handler dumps kernel log to
nvram, since commit 4388c9b3a6ee ("powerpc: Do not send system
reset request through the oops path") system reset request is
not allowed to take die path if fadump or kdump is configured,
hence we miss dumping kernel log to nvram, call kmsg_dump()
before carrying out fadump or kdump.

Fixes: 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path")
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
---
 arch/powerpc/kernel/traps.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 11caa0291254..82f43535e686 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -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
-- 
2.17.2


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

* Re: [PATCH] powerpc: dump kernel log before carrying out fadump or kdump
  2019-08-22  6:31 [PATCH] powerpc: dump kernel log before carrying out fadump or kdump Ganesh Goudar
@ 2019-08-27 10:12 ` Nicholas Piggin
  0 siblings, 0 replies; 2+ messages in thread
From: Nicholas Piggin @ 2019-08-27 10:12 UTC (permalink / raw)
  To: Ganesh Goudar, linuxppc-dev, mpe; +Cc: mahesh

Ganesh Goudar's on August 22, 2019 4:31 pm:
> Die or panic path in system reset handler dumps kernel log to
> nvram, since commit 4388c9b3a6ee ("powerpc: Do not send system
> reset request through the oops path") system reset request is
> not allowed to take die path if fadump or kdump is configured,
> hence we miss dumping kernel log to nvram, call kmsg_dump()
> before carrying out fadump or kdump.
> 
> Fixes: 4388c9b3a6ee ("powerpc: Do not send system reset request through the oops path")
> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
> Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>


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

end of thread, other threads:[~2019-08-27 10:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22  6:31 [PATCH] powerpc: dump kernel log before carrying out fadump or kdump Ganesh Goudar
2019-08-27 10:12 ` Nicholas Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).