patch-2.4.21 linux-2.4.21/arch/sparc64/kernel/traps.c

Next file: linux-2.4.21/arch/sparc64/kernel/winfixup.S
Previous file: linux-2.4.21/arch/sparc64/kernel/trampoline.S
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/arch/sparc64/kernel/traps.c linux-2.4.21/arch/sparc64/kernel/traps.c
@@ -1542,6 +1542,9 @@
 	struct reg_window *rw;
 	int count = 0;
 
+	if (tsk == current)
+		flushw_all();
+
 	fp = ksp + STACK_BIAS;
 	do {
 		/* Bogus frame pointer? */
@@ -1562,6 +1565,15 @@
 		show_trace_raw(tsk, tsk->thread.ksp);
 }
 
+void dump_stack(void)
+{
+	unsigned long ksp;
+
+	__asm__ __volatile__("mov	%%fp, %0"
+			     : "=r" (ksp));
+	show_trace_raw(current, ksp);
+}
+
 void die_if_kernel(char *str, struct pt_regs *regs)
 {
 	extern void __show_regs(struct pt_regs * regs);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)