aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/coldfire/entry.S
diff options
context:
space:
mode:
authorSebastian Siewior <bigeasy@linutronix.de>2008-04-30 22:17:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-01 11:08:36 -0400
commit6c5a7d504fb0e27aa90b96267177d434642a393d (patch)
tree2735d367a526fd9136f22fc117d99ab53e3f7577 /arch/m68knommu/platform/coldfire/entry.S
parent0042a1f7ecbc5d40eb2164f375ec87ecf3494418 (diff)
m68knommu: fix compare race in sched related code
The interrupts must be disabled before considering the need resched bit of the task struct and they have to be disabled before calling schedule() Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68knommu/platform/coldfire/entry.S')
-rw-r--r--arch/m68knommu/platform/coldfire/entry.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S
index 1af7c1d650f6..1e3c0dcbd7ac 100644
--- a/arch/m68knommu/platform/coldfire/entry.S
+++ b/arch/m68knommu/platform/coldfire/entry.S
@@ -103,6 +103,7 @@ ret_from_signal:
103 addql #4,%sp 103 addql #4,%sp
104 104
105ret_from_exception: 105ret_from_exception:
106 move #0x2700,%sr /* disable intrs */
106 btst #5,%sp@(PT_SR) /* check if returning to kernel */ 107 btst #5,%sp@(PT_SR) /* check if returning to kernel */
107 jeq Luser_return /* if so, skip resched, signals */ 108 jeq Luser_return /* if so, skip resched, signals */
108 109
@@ -156,6 +157,7 @@ Lreturn:
156 157
157Lwork_to_do: 158Lwork_to_do:
158 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */ 159 movel %a0@(TI_FLAGS),%d1 /* get thread_info->flags */
160 move #0x2000,%sr /* enable intrs again */
159 btst #TIF_NEED_RESCHED,%d1 161 btst #TIF_NEED_RESCHED,%d1
160 jne reschedule 162 jne reschedule
161 163