Blame SOURCES/ppc64_bt_active_task.patch

344a76
--- crash-7.0.9/ppc64.c.orig
344a76
+++ crash-7.0.9/ppc64.c
344a76
@@ -1,7 +1,7 @@
344a76
 /* ppc64.c -- core analysis suite
344a76
  *
344a76
- * Copyright (C) 2004-2014 David Anderson
344a76
- * Copyright (C) 2004-2014 Red Hat, Inc. All rights reserved.
344a76
+ * Copyright (C) 2004-2015 David Anderson
344a76
+ * Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved.
344a76
  * Copyright (C) 2004, 2006 Haren Myneni, IBM Corporation
344a76
  *
344a76
  * This program is free software; you can redistribute it and/or modify
344a76
@@ -414,7 +414,7 @@ ppc64_init(int when)
344a76
 		break;
344a76
 
344a76
 	case LOG_ONLY:
344a76
-		machdep->kvbase = kt->vmcoreinfo._stext_SYMBOL;
344a76
+		machdep->identity_map_base = kt->vmcoreinfo._stext_SYMBOL;
344a76
 		break;
344a76
 	}
344a76
 }
344a76
@@ -1898,8 +1898,8 @@ ppc64_print_regs(struct ppc64_pt_regs *r
344a76
 	int i;
344a76
 
344a76
         /* print out the gprs... */
344a76
-        for(i=0; i<32; i++) {
344a76
-                if(!(i % 3))
344a76
+        for (i=0; i<32; i++) {
344a76
+                if (i && !(i % 3))
344a76
                         fprintf(fp, "\n");
344a76
 
344a76
                 fprintf(fp, " R%d:%s %016lx   ", i,
344a76
@@ -1940,9 +1940,8 @@ ppc64_print_eframe(char *efrm_str, struc
344a76
 	if (BT_REFERENCE_CHECK(bt))
344a76
 		return;
344a76
 
344a76
-	fprintf(fp, " %s  [%lx] exception frame:", efrm_str, regs->trap);
344a76
+	fprintf(fp, " %s  [%lx] exception frame:\n", efrm_str, regs->trap);
344a76
 	ppc64_print_regs(regs);
344a76
-	fprintf(fp, "\n");
344a76
 }
344a76
 
344a76
 /*
344a76
@@ -1996,8 +1995,6 @@ ppc64_kdump_stack_frame(struct bt_info *
344a76
 		fprintf(fp, " LR  [%016lx] %s\n", pt_regs->link,
344a76
 			closest_symbol(pt_regs->link));
344a76
 
344a76
-	fprintf(fp, "\n");
344a76
-
344a76
 	return TRUE;
344a76
 }
344a76
 
344a76
@@ -2008,7 +2005,7 @@ static int
344a76
 ppc64_get_dumpfile_stack_frame(struct bt_info *bt_in, ulong *nip, ulong *ksp)
344a76
 {
344a76
 	int panic_task;
344a76
-	int i, panic;
344a76
+	int i;
344a76
 	char *sym;
344a76
 	ulong *up;
344a76
 	struct bt_info bt_local, *bt;
344a76
@@ -2092,10 +2089,8 @@ ppc64_get_dumpfile_stack_frame(struct bt
344a76
 			fprintf(fp, "Could not find SP for task %0lx\n",
344a76
 				bt->task);
344a76
 		}
344a76
-		return TRUE;
344a76
 	}
344a76
 
344a76
-	panic = FALSE;
344a76
 	/*
344a76
 	 * Check the process stack first. We are scanning stack for only
344a76
 	 * panic task. Even though we have dumping CPU's regs, we will be
344a76
@@ -2112,8 +2107,12 @@ retry:
344a76
                 if (STREQ(sym, ".netconsole_netdump") || 
344a76
 			STREQ(sym, ".netpoll_start_netdump") ||
344a76
 		 	STREQ(sym, ".start_disk_dump") ||
344a76
+		 	STREQ(sym, "crash_kexec") ||
344a76
+			STREQ(sym, "crash_fadump") ||
344a76
+		 	STREQ(sym, "crash_ipi_callback") ||
344a76
 		 	STREQ(sym, ".crash_kexec") ||
344a76
 			STREQ(sym, ".crash_fadump") ||
344a76
+		 	STREQ(sym, ".crash_ipi_callback") ||
344a76
 			STREQ(sym, ".disk_dump")) {
344a76
                         *nip = *up;
344a76
                         *ksp = bt->stackbase + 
344a76
@@ -2122,9 +2121,6 @@ retry:
344a76
                 }
344a76
 	}
344a76
 
344a76
-	if (panic) 
344a76
-		return TRUE;
344a76
-	
344a76
 	bt->flags &= ~(BT_HARDIRQ|BT_SOFTIRQ);
344a76
 
344a76
 	if (check_hardirq &&