patch-2.3.30 linux/arch/ppc/kernel/traps.c
Next file: linux/arch/ppc/lib/checksum.S
Previous file: linux/arch/ppc/kernel/smp.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Sat Nov 27 15:41:59 1999
- Orig file:
v2.3.29/linux/arch/ppc/kernel/traps.c
- Orig date:
Thu Nov 11 20:11:32 1999
diff -u --recursive --new-file v2.3.29/linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
@@ -128,6 +128,7 @@
_exception(SIGSEGV, regs);
}
+#if defined(CONFIG_ALTIVEC)
void
AltiVecUnavailable(struct pt_regs *regs)
{
@@ -163,6 +164,7 @@
/* enable altivec for the task on return */
regs->msr |= MSR_VEC;
}
+#endif /* CONFIG_ALTIVEC */
void
UnknownException(struct pt_regs *regs)
@@ -191,6 +193,20 @@
void
ProgramCheckException(struct pt_regs *regs)
{
+#if defined(CONFIG_4xx)
+ unsigned int instr;
+ unsigned int esr = mfspr(SPRN_ESR);
+
+ if (esr & ESR_PTR) {
+#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
+ if (debugger_bpt(regs))
+ return;
+#endif
+ _exception(SIGTRAP, regs);
+ } else {
+ _exception(SIGILL, regs);
+ }
+#else
if (regs->msr & 0x100000) {
/* IEEE FP exception */
_exception(SIGFPE, regs);
@@ -204,6 +220,7 @@
} else {
_exception(SIGILL, regs);
}
+#endif
}
void
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)