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>

authored by Akira Takeuchi and committed by Linus Torvalds 24646bd2 a8893fb3

+2 -1
+2 -1
arch/mn10300/kernel/entry.S
··· 180 180 181 181 #ifdef CONFIG_PREEMPT 182 182 ENTRY(resume_kernel) 183 + __cli 183 184 mov (TI_preempt_count,a2),d0 # non-zero preempt_count ? 184 185 cmp 0,d0 185 186 bne restore_all ··· 191 190 mov (REG_EPSW,fp),d0 192 191 and EPSW_IM,d0 193 192 cmp EPSW_IM_7,d0 # interrupts off (exception path) ? 194 - beq restore_all 193 + bne restore_all 195 194 call preempt_schedule_irq[],0 196 195 jmp need_resched 197 196 #endif