Skip to contentSkip to conversation

microblaze: Begin stack dump with caller of dump_stack()

PATCH New Steven J. Magnani 1 participant 1 message Feb 24, 2010 Microblaze architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 microblaze: Begin stack dump with caller of dump_stack()

Adjust the pointer used as the start of a stack dump so that the dump begins with the caller of dump_stack(). This makes the dump easier to interpret.

---

arch/microblaze/kernel/traps.c +3 -1
diff -uprN a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c
@@ -73,8 +73,10 @@ void show_stack(struct task_struct *task
 		if (task)
 			sp = (unsigned long *) ((struct thread_info *)
 						(task->stack))->cpu_context.r1;
-		else
+		else {
 			sp = (unsigned long *)&sp;
+			sp -= 2;	/* Pick up caller of dump_stack() */
+		}
 	}
 
 	stack = sp;