diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-30 10:37:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-30 10:37:05 -0700 |
commit | 815a4bb18ba834a58a60da14536ace4dcaa8b465 (patch) | |
tree | 73769cdcf8a42b10aa6063c3645c7175225d4589 /arch/arc/kernel/unaligned.c | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) | |
parent | 55c2e26204276b27f2b7a63123b701c950e45d89 (diff) |
Merge tag 'arc-fixes-for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC Fixes from Vineet Gupta:
- Handle unaligned access in zero delay loops
- spinlock livelock fix for SMP systemC model
- fix 32bit overflow in access_ok
- better setup of clockevents
* tag 'arc-fixes-for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
ARC: Use clockevents_config_and_register over clockevents_register_device
ARC: Workaround spinlock livelock in SMP SystemC simulation
ARC: Fix 32-bit wrap around in access_ok()
ARC: Handle zero-overhead-loop in unaligned access handler
Diffstat (limited to 'arch/arc/kernel/unaligned.c')
-rw-r--r-- | arch/arc/kernel/unaligned.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c index 28d170060747..7ff5b5c183bb 100644 --- a/arch/arc/kernel/unaligned.c +++ b/arch/arc/kernel/unaligned.c @@ -245,6 +245,12 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, regs->status32 &= ~STATUS_DE_MASK; } else { regs->ret += state.instr_len; + + /* handle zero-overhead-loop */ + if ((regs->ret == regs->lp_end) && (regs->lp_count)) { + regs->ret = regs->lp_start; + regs->lp_count--; + } } return 0; |