patch-2.1.79 linux/arch/ppc/kernel/traps.c

Next file: linux/arch/ppc/lib/Makefile
Previous file: linux/arch/ppc/kernel/time.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
@@ -61,10 +61,10 @@
 	if (!user_mode(regs))
 	{
 		show_regs(regs);
-		print_backtrace((unsigned long *)regs->gpr[1]);
 #ifdef CONFIG_XMON
 		xmon(regs);
 #endif
+		print_backtrace((unsigned long *)regs->gpr[1]);
 		panic("Exception in kernel pc %lx signal %d",regs->nip,signr);
 	}
 	force_sig(signr, current);
@@ -103,10 +103,10 @@
 			printk("Unknown values in msr\n");
 		}
 		show_regs(regs);
-		print_backtrace((unsigned long *)regs->gpr[1]);
 #ifdef CONFIG_XMON
 		xmon(regs);
 #endif
+		print_backtrace((unsigned long *)regs->gpr[1]);
 		panic("machine check");
 	}
 	_exception(SIGSEGV, regs);	
@@ -186,15 +186,16 @@
 }
 
 void
-PromException(struct pt_regs *regs, int trap)
+StackOverflow(struct pt_regs *regs)
 {
-	regs->trap = trap;
+	printk(KERN_CRIT "Kernel stack overflow in process %p, r1=%lx\n",
+	       current, regs->gpr[1]);
 #ifdef CONFIG_XMON
 	xmon(regs);
 #endif
-	printk("Exception %lx in prom at PC: %lx, SR: %lx\n",
-	       regs->trap, regs->nip, regs->msr);
-	/* probably should turn up the toes here */
+	show_regs(regs);
+	print_backtrace((unsigned long *)regs->gpr[1]);
+	panic("kernel stack overflow");
 }
 
 void

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov