diff options
| -rw-r--r-- | arch/arc/include/asm/unaligned.h | 3 | ||||
| -rw-r--r-- | arch/arc/kernel/entry.S | 4 | ||||
| -rw-r--r-- | arch/arc/kernel/traps.c | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/arch/arc/include/asm/unaligned.h b/arch/arc/include/asm/unaligned.h index 60702f3751d2..3e5f071bc00c 100644 --- a/arch/arc/include/asm/unaligned.h +++ b/arch/arc/include/asm/unaligned.h | |||
| @@ -22,7 +22,8 @@ static inline int | |||
| 22 | misaligned_fixup(unsigned long address, struct pt_regs *regs, | 22 | misaligned_fixup(unsigned long address, struct pt_regs *regs, |
| 23 | struct callee_regs *cregs) | 23 | struct callee_regs *cregs) |
| 24 | { | 24 | { |
| 25 | return 0; | 25 | /* Not fixed */ |
| 26 | return 1; | ||
| 26 | } | 27 | } |
| 27 | #endif | 28 | #endif |
| 28 | 29 | ||
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S index eb3f3c5a700a..daa0e7990270 100644 --- a/arch/arc/kernel/entry.S +++ b/arch/arc/kernel/entry.S | |||
| @@ -366,7 +366,6 @@ ARC_ENTRY EV_TLBProtV | |||
| 366 | ;========== (6b) Non aligned access ============ | 366 | ;========== (6b) Non aligned access ============ |
| 367 | 4: | 367 | 4: |
| 368 | 368 | ||
| 369 | #ifdef CONFIG_ARC_MISALIGN_ACCESS | ||
| 370 | SAVE_CALLEE_SAVED_USER | 369 | SAVE_CALLEE_SAVED_USER |
| 371 | mov r2, sp ; callee_regs | 370 | mov r2, sp ; callee_regs |
| 372 | 371 | ||
| @@ -375,9 +374,6 @@ ARC_ENTRY EV_TLBProtV | |||
| 375 | ; TBD: optimize - do this only if a callee reg was involved | 374 | ; TBD: optimize - do this only if a callee reg was involved |
| 376 | ; either a dst of emulated LD/ST or src with address-writeback | 375 | ; either a dst of emulated LD/ST or src with address-writeback |
| 377 | RESTORE_CALLEE_SAVED_USER | 376 | RESTORE_CALLEE_SAVED_USER |
| 378 | #else | ||
| 379 | bl do_misaligned_error | ||
| 380 | #endif | ||
| 381 | 377 | ||
| 382 | b ret_from_exception | 378 | b ret_from_exception |
| 383 | 379 | ||
diff --git a/arch/arc/kernel/traps.c b/arch/arc/kernel/traps.c index e21692d2fdab..3eadfdabc322 100644 --- a/arch/arc/kernel/traps.c +++ b/arch/arc/kernel/traps.c | |||
| @@ -84,19 +84,18 @@ DO_ERROR_INFO(SIGBUS, "Invalid Mem Access", do_memory_error, BUS_ADRERR) | |||
| 84 | DO_ERROR_INFO(SIGTRAP, "Breakpoint Set", trap_is_brkpt, TRAP_BRKPT) | 84 | DO_ERROR_INFO(SIGTRAP, "Breakpoint Set", trap_is_brkpt, TRAP_BRKPT) |
| 85 | DO_ERROR_INFO(SIGBUS, "Misaligned Access", do_misaligned_error, BUS_ADRALN) | 85 | DO_ERROR_INFO(SIGBUS, "Misaligned Access", do_misaligned_error, BUS_ADRALN) |
| 86 | 86 | ||
| 87 | #ifdef CONFIG_ARC_MISALIGN_ACCESS | ||
| 88 | /* | 87 | /* |
| 89 | * Entry Point for Misaligned Data access Exception, for emulating in software | 88 | * Entry Point for Misaligned Data access Exception, for emulating in software |
| 90 | */ | 89 | */ |
| 91 | int do_misaligned_access(unsigned long address, struct pt_regs *regs, | 90 | int do_misaligned_access(unsigned long address, struct pt_regs *regs, |
| 92 | struct callee_regs *cregs) | 91 | struct callee_regs *cregs) |
| 93 | { | 92 | { |
| 93 | /* If emulation not enabled, or failed, kill the task */ | ||
| 94 | if (misaligned_fixup(address, regs, cregs) != 0) | 94 | if (misaligned_fixup(address, regs, cregs) != 0) |
| 95 | return do_misaligned_error(address, regs); | 95 | return do_misaligned_error(address, regs); |
| 96 | 96 | ||
| 97 | return 0; | 97 | return 0; |
| 98 | } | 98 | } |
| 99 | #endif | ||
| 100 | 99 | ||
| 101 | /* | 100 | /* |
| 102 | * Entry point for miscll errors such as Nested Exceptions | 101 | * Entry point for miscll errors such as Nested Exceptions |
