public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH] ppc/fadump: invoke kmsg_dump in fadump panic path
@ 2026-04-07  5:43 Shivang Upadhyay
  2026-04-07 15:30 ` Sourabh Jain
  0 siblings, 1 reply; 3+ messages in thread
From: Shivang Upadhyay @ 2026-04-07  5:43 UTC (permalink / raw)
  To: linuxppc-dev, linux-kernel
  Cc: maddy, mpe, npiggin, chleroy, kees, tony.luck, gpiccoli,
	ritesh.list, rppt, Shivang Upadhyay, Hari Bathini,
	Mahesh Salgaonkar, Shirisha G, Sourabh Jain

fadump is registered in panic_notifier_list and gets triggered
before kmsg_dump_desc() in the panic path. As a result,
kmsg_dumpers (e.g. pstore) are not executed.

Invoke kmsg_dump_desc() from the fadump handler to ensure
kmsg_dumpers are called during panic.

Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reported-by: Shirisha G <shirisha@linux.ibm.com>
Suggested-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com>
---
 arch/powerpc/kernel/setup-common.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index b1761909c23f..c329b071643d 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -68,6 +68,7 @@
 #include <asm/kasan.h>
 #include <asm/mce.h>
 #include <asm/systemcfg.h>
+#include <linux/kmsg_dump.h>
 
 #include "setup.h"
 
@@ -748,6 +749,8 @@ static int ppc_panic_fadump_handler(struct notifier_block *this,
 	 * If firmware-assisted dump has been registered then trigger
 	 * its callback and let the firmware handles everything else.
 	 */
+	kmsg_dump_desc(KMSG_DUMP_PANIC, (char *)ptr);
+
 	crash_fadump(NULL, ptr);
 
 	return NOTIFY_DONE;
-- 
2.53.0



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

end of thread, other threads:[~2026-04-09  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07  5:43 [PATCH] ppc/fadump: invoke kmsg_dump in fadump panic path Shivang Upadhyay
2026-04-07 15:30 ` Sourabh Jain
2026-04-09  9:14   ` Shivang Upadhyay

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