diff options
Diffstat (limited to 'arch/arm/kernel/traps.c')
| -rw-r--r-- | arch/arm/kernel/traps.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 908915675edc..24095601359b 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
| @@ -32,13 +32,6 @@ | |||
| 32 | #include "ptrace.h" | 32 | #include "ptrace.h" |
| 33 | #include "signal.h" | 33 | #include "signal.h" |
| 34 | 34 | ||
| 35 | const char *processor_modes[]= | ||
| 36 | { "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , | ||
| 37 | "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26", | ||
| 38 | "USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "UK6_32" , "ABT_32" , | ||
| 39 | "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32" | ||
| 40 | }; | ||
| 41 | |||
| 42 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; | 35 | static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; |
| 43 | 36 | ||
| 44 | #ifdef CONFIG_DEBUG_USER | 37 | #ifdef CONFIG_DEBUG_USER |
| @@ -289,7 +282,10 @@ asmlinkage void do_undefinstr(struct pt_regs *regs) | |||
| 289 | regs->ARM_pc -= correction; | 282 | regs->ARM_pc -= correction; |
| 290 | 283 | ||
| 291 | pc = (void __user *)instruction_pointer(regs); | 284 | pc = (void __user *)instruction_pointer(regs); |
| 292 | if (thumb_mode(regs)) { | 285 | |
| 286 | if (processor_mode(regs) == SVC_MODE) { | ||
| 287 | instr = *(u32 *) pc; | ||
| 288 | } else if (thumb_mode(regs)) { | ||
| 293 | get_user(instr, (u16 __user *)pc); | 289 | get_user(instr, (u16 __user *)pc); |
| 294 | } else { | 290 | } else { |
| 295 | get_user(instr, (u32 __user *)pc); | 291 | get_user(instr, (u32 __user *)pc); |
| @@ -337,12 +333,11 @@ asmlinkage void do_unexp_fiq (struct pt_regs *regs) | |||
| 337 | * It never returns, and never tries to sync. We hope that we can at least | 333 | * It never returns, and never tries to sync. We hope that we can at least |
| 338 | * dump out some state information... | 334 | * dump out some state information... |
| 339 | */ | 335 | */ |
| 340 | asmlinkage void bad_mode(struct pt_regs *regs, int reason, int proc_mode) | 336 | asmlinkage void bad_mode(struct pt_regs *regs, int reason) |
| 341 | { | 337 | { |
| 342 | console_verbose(); | 338 | console_verbose(); |
| 343 | 339 | ||
| 344 | printk(KERN_CRIT "Bad mode in %s handler detected: mode %s\n", | 340 | printk(KERN_CRIT "Bad mode in %s handler detected\n", handler[reason]); |
| 345 | handler[reason], processor_modes[proc_mode]); | ||
| 346 | 341 | ||
| 347 | die("Oops - bad mode", regs, 0); | 342 | die("Oops - bad mode", regs, 0); |
| 348 | local_irq_disable(); | 343 | local_irq_disable(); |
