diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-06-07 15:07:25 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-13 07:20:09 -0400 |
commit | 6510a20e1b1a3a5703429a09d03adf44882ae373 (patch) | |
tree | f85bcdfdc87cdb05c2791f220c19c0af889c0827 /arch | |
parent | 47e9dedb720364e0adff0e99960fa294c6161f71 (diff) |
Blackfin: fix trap_c() exit paths
The trap_c() code pushes the hardware trace status onto the stack, but
doesn't always restore it when returning from some trap code paths. So
unify the exit code paths to all head to the end of the function.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/blackfin/kernel/traps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 2405f193224e..ed7127b1b9f9 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -309,7 +309,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
309 | CHK_DEBUGGER_TRAP_MAYBE(); | 309 | CHK_DEBUGGER_TRAP_MAYBE(); |
310 | /* Check if this is a breakpoint in kernel space */ | 310 | /* Check if this is a breakpoint in kernel space */ |
311 | if (fp->ipend & 0xffc0) | 311 | if (fp->ipend & 0xffc0) |
312 | return; | 312 | goto traps_done; |
313 | else | 313 | else |
314 | break; | 314 | break; |
315 | /* 0x03 - User Defined, userspace stack overflow */ | 315 | /* 0x03 - User Defined, userspace stack overflow */ |
@@ -325,7 +325,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
325 | info.si_code = TRAP_ILLTRAP; | 325 | info.si_code = TRAP_ILLTRAP; |
326 | sig = SIGTRAP; | 326 | sig = SIGTRAP; |
327 | CHK_DEBUGGER_TRAP(); | 327 | CHK_DEBUGGER_TRAP(); |
328 | return; | 328 | goto traps_done; |
329 | #endif | 329 | #endif |
330 | /* 0x04 - User Defined */ | 330 | /* 0x04 - User Defined */ |
331 | /* 0x05 - User Defined */ | 331 | /* 0x05 - User Defined */ |
@@ -355,7 +355,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
355 | CHK_DEBUGGER_TRAP_MAYBE(); | 355 | CHK_DEBUGGER_TRAP_MAYBE(); |
356 | /* Check if this is a single step in kernel space */ | 356 | /* Check if this is a single step in kernel space */ |
357 | if (fp->ipend & 0xffc0) | 357 | if (fp->ipend & 0xffc0) |
358 | return; | 358 | goto traps_done; |
359 | else | 359 | else |
360 | break; | 360 | break; |
361 | /* 0x11 - Trace Buffer Full, handled here */ | 361 | /* 0x11 - Trace Buffer Full, handled here */ |
@@ -459,7 +459,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
459 | CHK_DEBUGGER_TRAP_MAYBE(); | 459 | CHK_DEBUGGER_TRAP_MAYBE(); |
460 | /* Check if this is a watchpoint in kernel space */ | 460 | /* Check if this is a watchpoint in kernel space */ |
461 | if (fp->ipend & 0xffc0) | 461 | if (fp->ipend & 0xffc0) |
462 | return; | 462 | goto traps_done; |
463 | else | 463 | else |
464 | break; | 464 | break; |
465 | #ifdef CONFIG_BF535 | 465 | #ifdef CONFIG_BF535 |
@@ -624,8 +624,8 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
624 | if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) | 624 | if (ANOMALY_05000461 && trapnr == VEC_HWERR && !access_ok(VERIFY_READ, fp->pc, 8)) |
625 | fp->pc = SAFE_USER_INSTRUCTION; | 625 | fp->pc = SAFE_USER_INSTRUCTION; |
626 | 626 | ||
627 | traps_done: | ||
627 | trace_buffer_restore(j); | 628 | trace_buffer_restore(j); |
628 | return; | ||
629 | } | 629 | } |
630 | 630 | ||
631 | /* Typical exception handling routines */ | 631 | /* Typical exception handling routines */ |