diff options
Diffstat (limited to 'arch/sh/kernel/traps_32.c')
-rw-r--r-- | arch/sh/kernel/traps_32.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/sh/kernel/traps_32.c b/arch/sh/kernel/traps_32.c index 30ca9c51e52d..2b772776fcda 100644 --- a/arch/sh/kernel/traps_32.c +++ b/arch/sh/kernel/traps_32.c | |||
@@ -34,6 +34,7 @@ | |||
34 | # define TRAP_ILLEGAL_SLOT_INST 6 | 34 | # define TRAP_ILLEGAL_SLOT_INST 6 |
35 | # define TRAP_ADDRESS_ERROR 9 | 35 | # define TRAP_ADDRESS_ERROR 9 |
36 | # ifdef CONFIG_CPU_SH2A | 36 | # ifdef CONFIG_CPU_SH2A |
37 | # define TRAP_UBC 12 | ||
37 | # define TRAP_FPU_ERROR 13 | 38 | # define TRAP_FPU_ERROR 13 |
38 | # define TRAP_DIVZERO_ERROR 17 | 39 | # define TRAP_DIVZERO_ERROR 17 |
39 | # define TRAP_DIVOVF_ERROR 18 | 40 | # define TRAP_DIVOVF_ERROR 18 |
@@ -176,7 +177,7 @@ static struct mem_access user_mem_access = { | |||
176 | * (if that instruction is in a branch delay slot) | 177 | * (if that instruction is in a branch delay slot) |
177 | * - return 0 if emulation okay, -EFAULT on existential error | 178 | * - return 0 if emulation okay, -EFAULT on existential error |
178 | */ | 179 | */ |
179 | static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs, | 180 | static int handle_unaligned_ins(insn_size_t instruction, struct pt_regs *regs, |
180 | struct mem_access *ma) | 181 | struct mem_access *ma) |
181 | { | 182 | { |
182 | int ret, index, count; | 183 | int ret, index, count; |
@@ -321,10 +322,10 @@ static int handle_unaligned_ins(opcode_t instruction, struct pt_regs *regs, | |||
321 | * - fetches the instruction from PC+2 | 322 | * - fetches the instruction from PC+2 |
322 | */ | 323 | */ |
323 | static inline int handle_delayslot(struct pt_regs *regs, | 324 | static inline int handle_delayslot(struct pt_regs *regs, |
324 | opcode_t old_instruction, | 325 | insn_size_t old_instruction, |
325 | struct mem_access *ma) | 326 | struct mem_access *ma) |
326 | { | 327 | { |
327 | opcode_t instruction; | 328 | insn_size_t instruction; |
328 | void __user *addr = (void __user *)(regs->pc + | 329 | void __user *addr = (void __user *)(regs->pc + |
329 | instruction_size(old_instruction)); | 330 | instruction_size(old_instruction)); |
330 | 331 | ||
@@ -364,7 +365,7 @@ static inline int handle_delayslot(struct pt_regs *regs, | |||
364 | 365 | ||
365 | static int handle_unaligned_notify_count = 10; | 366 | static int handle_unaligned_notify_count = 10; |
366 | 367 | ||
367 | int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, | 368 | int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, |
368 | struct mem_access *ma) | 369 | struct mem_access *ma) |
369 | { | 370 | { |
370 | u_int rm; | 371 | u_int rm; |
@@ -522,7 +523,7 @@ asmlinkage void do_address_error(struct pt_regs *regs, | |||
522 | unsigned long error_code = 0; | 523 | unsigned long error_code = 0; |
523 | mm_segment_t oldfs; | 524 | mm_segment_t oldfs; |
524 | siginfo_t info; | 525 | siginfo_t info; |
525 | opcode_t instruction; | 526 | insn_size_t instruction; |
526 | int tmp; | 527 | int tmp; |
527 | 528 | ||
528 | /* Intentional ifdef */ | 529 | /* Intentional ifdef */ |
@@ -849,6 +850,10 @@ void __init trap_init(void) | |||
849 | #endif | 850 | #endif |
850 | #endif | 851 | #endif |
851 | 852 | ||
853 | #ifdef TRAP_UBC | ||
854 | set_exception_table_vec(TRAP_UBC, break_point_trap); | ||
855 | #endif | ||
856 | |||
852 | /* Setup VBR for boot cpu */ | 857 | /* Setup VBR for boot cpu */ |
853 | per_cpu_trap_init(); | 858 | per_cpu_trap_init(); |
854 | } | 859 | } |