Skip to content

Commit 24646bd

Browse files
Akira Takeuchitorvalds
authored andcommitted
MN10300: Fix the preemption resume_kernel() routine
Fix the preemption resume_kernel() routine by inverting the test to see whether interrupts are off (IM7 is all enabled, not all disabled). Furthermore, interrupts should be disabled on entry to resume_kernel() so that they're correctly set for jumping to restore_all() and doing the need reschedule test. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a8893fb commit 24646bd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/mn10300/kernel/entry.S‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ ENTRY(resume_userspace)
180180

181181
#ifdef CONFIG_PREEMPT
182182
ENTRY(resume_kernel)
183+
__cli
183184
mov (TI_preempt_count,a2),d0 # non-zero preempt_count ?
184185
cmp 0,d0
185186
bne restore_all
@@ -190,7 +191,7 @@ need_resched:
190191
mov (REG_EPSW,fp),d0
191192
and EPSW_IM,d0
192193
cmp EPSW_IM_7,d0 # interrupts off (exception path) ?
193-
beq restore_all
194+
bne restore_all
194195
call preempt_schedule_irq[],0
195196
jmp need_resched
196197
#endif

0 commit comments

Comments
 (0)