diff options
author | Michal Simek <monstr@monstr.eu> | 2009-05-26 16:30:27 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-05-26 16:45:21 +0200 |
commit | 17f3324c3eb271882b9e6b8fc3b1698290121801 (patch) | |
tree | 3fbf264094b952240a0a28e3a2aad6cbd45e29b5 /arch/microblaze/kernel/traps.c | |
parent | 65504a47e02e4e6e58884376f4a700f83cc8234f (diff) | |
download | op-kernel-dev-17f3324c3eb271882b9e6b8fc3b1698290121801.zip op-kernel-dev-17f3324c3eb271882b9e6b8fc3b1698290121801.tar.gz |
microblaze_mmu_v2: Traps MMU update
Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/traps.c')
-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 6322cc1..eaaaf80 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c @@ -97,3 +97,37 @@ void dump_stack(void) show_stack(NULL, NULL); } EXPORT_SYMBOL(dump_stack); + +#ifdef CONFIG_MMU +void __bug(const char *file, int line, void *data) +{ + if (data) + printk(KERN_CRIT "kernel BUG at %s:%d (data = %p)!\n", + file, line, data); + else + printk(KERN_CRIT "kernel BUG at %s:%d!\n", file, line); + + machine_halt(); +} + +int bad_trap(int trap_num, struct pt_regs *regs) +{ + printk(KERN_CRIT + "unimplemented trap %d called at 0x%08lx, pid %d!\n", + trap_num, regs->pc, current->pid); + return -ENOSYS; +} + +int debug_trap(struct pt_regs *regs) +{ + int i; + printk(KERN_CRIT "debug trap\n"); + for (i = 0; i < 32; i++) { + /* printk("r%i:%08X\t",i,regs->gpr[i]); */ + if ((i % 4) == 3) + printk(KERN_CRIT "\n"); + } + printk(KERN_CRIT "pc:%08lX\tmsr:%08lX\n", regs->pc, regs->msr); + return -ENOSYS; +} +#endif |