[PATCH] fadump: Add support for compressed firmware-assisted dump.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

The firmware assisted dump (fadump) patches are still under discussion. When
fadump patches gets into upstream kernel, this change will need to go into
crash. For now, I am posting this patch for a review.

Reference: http://lists.ozlabs.org/pipermail/linuxppc-dev/2011-December/094859.html

Thanks,
-Mahesh.


From: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxxxxxxx>

With the firmware-assisted dump (fadump) support added for Powerpc the
crash tool also needs to be modified to be able to read compressed/filtered
firmware-assisted dump (diskdump). The crash tool is able to read and
identify the panic task for ELF formatted dump generated by firmware
assisted dump mechanism. But when fadump is filtered/compressed using
makdumpfile the crash tool fails to identify panic task and back trace
associated to panic task. This patch enables crash tool to identify the
panic task for dump generated by firmware-assisted dump on Power platform.

Signed-off-by: Mahesh Salgaonkar <mahesh@xxxxxxxxxxxxxxxxxx>
---
 ppc64.c |    1 +
 task.c  |   21 ++++++++++++++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/ppc64.c b/ppc64.c
index eee7359..196c417 100755
--- a/ppc64.c
+++ b/ppc64.c
@@ -1907,6 +1907,7 @@ retry:
 			STREQ(sym, ".netpoll_start_netdump") ||
 		 	STREQ(sym, ".start_disk_dump") ||
 		 	STREQ(sym, ".crash_kexec") ||
+			STREQ(sym, ".crash_fadump") ||
 			STREQ(sym, ".disk_dump")) {
                         *nip = *up;
                         *ksp = bt->stackbase + 
diff --git a/task.c b/task.c
index 1ce48ea..ec1984e 100755
--- a/task.c
+++ b/task.c
@@ -6443,6 +6443,13 @@ clear_active_set(void)
 				crash_kexec_task);	  	\
 		return crash_kexec_task;			\
 	}							\
+	if (crash_fadump_task) {					\
+		if (CRASHDEBUG(1))				\
+			error(INFO,				\
+	    "get_active_set_panic_task: %lx (crash_fadump)\n",   \
+				crash_fadump_task);		\
+		return crash_fadump_task;			\
+	}							\
         if ((panic_task > (NO_TASK+1)) && !die_task) {		\
 		if (CRASHDEBUG(1))				\
 			fprintf(fp, 				\
@@ -6508,6 +6515,10 @@ clear_active_set(void)
                     strstr(buf, " .crash_kexec+")) {    \
 			crash_kexec_task = task;	\
                 }                                       \
+                if (strstr(buf, " crash_fadump+") ||     \
+                    strstr(buf, " .crash_fadump+")) {    \
+			crash_fadump_task = task;	\
+                }                                       \
                 if (strstr(buf, " machine_kexec+") ||     \
                     strstr(buf, " .machine_kexec+")) {    \
 			crash_kexec_task = task;	\
@@ -6531,12 +6542,13 @@ get_active_set_panic_task()
 	int i, j, found;
 	ulong task;
 	char buf[BUFSIZE];
-	ulong panic_task, die_task, crash_kexec_task;
+	ulong panic_task, die_task, crash_kexec_task, crash_fadump_task;
 	ulong xen_panic_task;
 	ulong xen_sysrq_task;
 
 	panic_task = die_task = crash_kexec_task = xen_panic_task = NO_TASK;
 	xen_sysrq_task = NO_TASK;
+	crash_fadump_task = NO_TASK;
 
         for (i = 0; i < NR_CPUS; i++) {
                 if (!(task = tt->active_set[i]) || !task_exists(task))
@@ -6616,6 +6628,13 @@ get_active_set_panic_task()
 				crash_kexec_task);
 		return crash_kexec_task;
 	}
+	if (crash_fadump_task) {
+		if (CRASHDEBUG(1))
+			error(INFO,
+		    "get_active_set_panic_task: %lx (crash_fadump)\n",
+				crash_fadump_task);
+		return crash_fadump_task;
+	}
 
 	if (xen_sysrq_task) {
 		if (CRASHDEBUG(1))

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux