diff options
-rw-r--r-- | arch/blackfin/kernel/process.c | 10 | ||||
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 9da36bab7ccb..f5b286189647 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -282,25 +282,19 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
282 | { | 282 | { |
283 | int __user *up0 = (int __user *)regs->p0; | 283 | int __user *up0 = (int __user *)regs->p0; |
284 | 284 | ||
285 | if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END) | ||
286 | return; | ||
287 | |||
288 | switch (regs->pc) { | 285 | switch (regs->pc) { |
289 | case ATOMIC_XCHG32 + 2: | 286 | case ATOMIC_XCHG32 + 2: |
290 | put_user(regs->r1, up0); | 287 | put_user(regs->r1, up0); |
291 | regs->pc += 2; | 288 | regs->pc = ATOMIC_XCHG32 + 4; |
292 | break; | 289 | break; |
293 | 290 | ||
294 | case ATOMIC_CAS32 + 2: | 291 | case ATOMIC_CAS32 + 2: |
295 | case ATOMIC_CAS32 + 4: | 292 | case ATOMIC_CAS32 + 4: |
296 | if (regs->r0 == regs->r1) | 293 | if (regs->r0 == regs->r1) |
294 | case ATOMIC_CAS32 + 6: | ||
297 | put_user(regs->r2, up0); | 295 | put_user(regs->r2, up0); |
298 | regs->pc = ATOMIC_CAS32 + 8; | 296 | regs->pc = ATOMIC_CAS32 + 8; |
299 | break; | 297 | break; |
300 | case ATOMIC_CAS32 + 6: | ||
301 | put_user(regs->r2, up0); | ||
302 | regs->pc += 2; | ||
303 | break; | ||
304 | 298 | ||
305 | case ATOMIC_ADD32 + 2: | 299 | case ATOMIC_ADD32 + 2: |
306 | regs->r0 = regs->r1 + regs->r0; | 300 | regs->r0 = regs->r1 + regs->r0; |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index e7eb16355f74..a9b15aaf5254 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -1025,6 +1025,12 @@ ENTRY(_schedule_and_signal_from_int) | |||
1025 | #endif | 1025 | #endif |
1026 | sti r0; | 1026 | sti r0; |
1027 | 1027 | ||
1028 | /* finish the userspace "atomic" functions for it */ | ||
1029 | r1 = FIXED_CODE_END; | ||
1030 | r2 = [sp + PT_PC]; | ||
1031 | cc = r1 <= r2; | ||
1032 | if cc jump .Lresume_userspace (bp); | ||
1033 | |||
1028 | r0 = sp; | 1034 | r0 = sp; |
1029 | sp += -12; | 1035 | sp += -12; |
1030 | call _finish_atomic_sections; | 1036 | call _finish_atomic_sections; |