diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 16:15:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-12 16:15:17 -0400 |
commit | 02a99ed6207e9a1d787bb360ef97de023c7edf4a (patch) | |
tree | f5818df7dd3f3741d02afbdd4271deed48c41f3d /arch/microblaze/kernel/traps.c | |
parent | 2b10dc45d15150434d7f206264e912eacbff734b (diff) | |
parent | 3447ef29a7f3b1fd0d8d58376950e695e04f6f8b (diff) |
Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (55 commits)
microblaze: Don't use access_ok for unaligned
microblaze: remove unused flat_stack_align() definition
microblaze: Fix problem with early_printk in startup
microblaze_mmu_v2: Makefiles
microblaze_mmu_v2: Kconfig update
microblaze_mmu_v2: stat.h MMU update
microblaze_mmu_v2: Elf update
microblaze_mmu_v2: Update dma.h for MMU
microblaze_mmu_v2: Update cacheflush.h
microblaze_mmu_v2: Update signal returning address
microblaze_mmu_v2: Traps MMU update
microblaze_mmu_v2: Enable fork syscall for MMU and add fork as vfork for noMMU
microblaze_mmu_v2: Update linker script for MMU
microblaze_mmu_v2: Add MMU related exceptions handling
microblaze_mmu_v2: uaccess MMU update
microblaze_mmu_v2: Update exception handling - MMU exception
microblaze_mmu_v2: entry.S, entry.h
microblaze_mmu_v2: Add CURRENT_TASK for entry.S
microblaze_mmu_v2: MMU asm offset update
microblaze_mmu_v2: Update tlb.h and tlbflush.h
...
Diffstat (limited to 'arch/microblaze/kernel/traps.c')
-rw-r--r-- | arch/microblaze/kernel/traps.c | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index 293ef486013a..eaaaf805f31b 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -22,14 +22,6 @@ void trap_init(void) | |||
22 | __enable_hw_exceptions(); | 22 | __enable_hw_exceptions(); |
23 | } | 23 | } |
24 | 24 | ||
25 | void __bad_xchg(volatile void *ptr, int size) | ||
26 | { | ||
27 | printk(KERN_INFO "xchg: bad data size: pc 0x%p, ptr 0x%p, size %d\n", | ||
28 | __builtin_return_address(0), ptr, size); | ||
29 | BUG(); | ||
30 | } | ||
31 | EXPORT_SYMBOL(__bad_xchg); | ||
32 | |||
33 | static int kstack_depth_to_print = 24; | 25 | static int kstack_depth_to_print = 24; |
34 | 26 | ||
35 | static int __init kstack_setup(char *s) | 27 | static int __init kstack_setup(char *s) |
@@ -105,3 +97,37 @@ void dump_stack(void) | |||
105 | show_stack(NULL, NULL); | 97 | show_stack(NULL, NULL); |
106 | } | 98 | } |
107 | 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 | ||