diff options
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 1 | ||||
-rw-r--r-- | arch/arm/kernel/process.c | 8 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 12 |
3 files changed, 9 insertions, 12 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 8517c3c3eb33..cc10a093a545 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -99,7 +99,6 @@ common_invalid: | |||
99 | @ cpsr_<exception>, "old_r0" | 99 | @ cpsr_<exception>, "old_r0" |
100 | 100 | ||
101 | mov r0, sp | 101 | mov r0, sp |
102 | and r2, r6, #0x1f | ||
103 | b bad_mode | 102 | b bad_mode |
104 | 103 | ||
105 | /* | 104 | /* |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index a9e8f7e55fd6..782af3cb213f 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -36,7 +36,13 @@ | |||
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
38 | 38 | ||
39 | extern const char *processor_modes[]; | 39 | static const char *processor_modes[] = { |
40 | "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , | ||
41 | "UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26", | ||
42 | "USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "UK6_32" , "ABT_32" , | ||
43 | "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32" | ||
44 | }; | ||
45 | |||
40 | extern void setup_mm_for_reboot(char mode); | 46 | extern void setup_mm_for_reboot(char mode); |
41 | 47 | ||
42 | static volatile int hlt_counter; | 48 | static volatile int hlt_counter; |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 908915675edc..329609b84d3b 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 |
@@ -337,12 +330,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 | 330 | * It never returns, and never tries to sync. We hope that we can at least |
338 | * dump out some state information... | 331 | * dump out some state information... |
339 | */ | 332 | */ |
340 | asmlinkage void bad_mode(struct pt_regs *regs, int reason, int proc_mode) | 333 | asmlinkage void bad_mode(struct pt_regs *regs, int reason) |
341 | { | 334 | { |
342 | console_verbose(); | 335 | console_verbose(); |
343 | 336 | ||
344 | printk(KERN_CRIT "Bad mode in %s handler detected: mode %s\n", | 337 | printk(KERN_CRIT "Bad mode in %s handler detected\n", handler[reason]); |
345 | handler[reason], processor_modes[proc_mode]); | ||
346 | 338 | ||
347 | die("Oops - bad mode", regs, 0); | 339 | die("Oops - bad mode", regs, 0); |
348 | local_irq_disable(); | 340 | local_irq_disable(); |