diff options
author | Michal Simek <monstr@monstr.eu> | 2009-05-26 10:30:27 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-05-26 10:45:21 -0400 |
commit | 17f3324c3eb271882b9e6b8fc3b1698290121801 (patch) | |
tree | 3fbf264094b952240a0a28e3a2aad6cbd45e29b5 /arch/microblaze/kernel | |
parent | 65504a47e02e4e6e58884376f4a700f83cc8234f (diff) |
microblaze_mmu_v2: Traps MMU update
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r-- | arch/microblaze/kernel/traps.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index 6322cc174474..eaaaf805f31b 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -97,3 +97,37 @@ void dump_stack(void) | |||
97 | show_stack(NULL, NULL); | 97 | show_stack(NULL, NULL); |
98 | } | 98 | } |
99 | EXPORT_SYMBOL(dump_stack); | 99 | EXPORT_SYMBOL(dump_stack); |
100 | |||
101 | #ifdef CONFIG_MMU | ||
102 | void __bug(const char *file, int line, void *data) | ||
103 | { | ||
104 | if (data) | ||
105 | printk(KERN_CRIT "kernel BUG at %s:%d (data = %p)!\n", | ||
106 | file, line, data); | ||
107 | else | ||
108 | printk(KERN_CRIT "kernel BUG at %s:%d!\n", file, line); | ||
109 | |||
110 | machine_halt(); | ||
111 | } | ||
112 | |||
113 | int bad_trap(int trap_num, struct pt_regs *regs) | ||
114 | { | ||
115 | printk(KERN_CRIT | ||
116 | "unimplemented trap %d called at 0x%08lx, pid %d!\n", | ||
117 | trap_num, regs->pc, current->pid); | ||
118 | return -ENOSYS; | ||
119 | } | ||
120 | |||
121 | int debug_trap(struct pt_regs *regs) | ||
122 | { | ||
123 | int i; | ||
124 | printk(KERN_CRIT "debug trap\n"); | ||
125 | for (i = 0; i < 32; i++) { | ||
126 | /* printk("r%i:%08X\t",i,regs->gpr[i]); */ | ||
127 | if ((i % 4) == 3) | ||
128 | printk(KERN_CRIT "\n"); | ||
129 | } | ||
130 | printk(KERN_CRIT "pc:%08lX\tmsr:%08lX\n", regs->pc, regs->msr); | ||
131 | return -ENOSYS; | ||
132 | } | ||
133 | #endif | ||