22 #include <linux/sched.h>
23 #include <linux/module.h>
27 #include <linux/signal.h>
29 #include <asm/traps.h>
31 #include <asm/syscall.h>
32 #include <asm/registers.h>
33 #include <asm/unistd.h>
34 #include <asm/sections.h>
39 #define TRAP_SYSCALL 1
40 #define TRAP_DEBUG 0xdb
46 #ifdef CONFIG_GENERIC_BUG
54 static const char *ex_name(
int ex)
59 return "Execute protection fault";
62 return "Read protection fault";
65 return "Write protection fault";
67 return "Misaligned instruction";
69 return "Misaligned data load";
71 return "Misaligned data store";
74 return "Illegal instruction";
76 return "Precise bus error";
81 return "Debugger trap";
84 return "Unrecognized exception";
109 asm(
"%0 = r30" :
"=r" (
fp));
111 fp = (
unsigned long *)
113 task->
thread.switch_sp)->fp;
117 if ((((
unsigned long)
fp) & 0x3) || ((
unsigned long) fp < 0x1000)) {
131 for (i = 0; i < kstack_depth_to_print; i++) {
137 if (((
unsigned long) fp < low) || (high < (
unsigned long) fp))
143 newfp = (
unsigned long *) *fp;
145 if (((
unsigned long) newfp) & 0x3) {
164 kstack_depth_to_print += 6;
170 newfp = (
unsigned long *) regs->
r30;
191 do_show_stack(task, fp, 0);
197 asm(
"%0 = r30" :
"=r" (
fp));
215 spin_lock_irq(&
die.lock);
230 spin_unlock_irq(&
die.lock);
233 panic(
"Fatal exception in interrupt");
236 panic(
"Fatal exception");
246 return die(str, regs, err);
254 static void misaligned_instruction(
struct pt_regs *regs)
265 static void misaligned_data_load(
struct pt_regs *regs)
271 static void misaligned_data_store(
struct pt_regs *regs)
287 static void precise_bus_error(
struct pt_regs *regs)
298 static void cache_error(
struct pt_regs *regs)
300 die(
"Cache Error", regs, 0);
325 misaligned_instruction(regs);
328 misaligned_data_load(regs);
331 misaligned_data_store(regs);
338 precise_bus_error(regs);
359 unsigned long syscallret = 0;
368 tracehook_report_syscall_entry(regs)))
399 syscallret = syscall(regs->
r00, regs->
r01,
412 regs->
r00 = syscallret;
416 tracehook_report_syscall_exit(regs, 0);