From: Akira Takeuchi Date: Wed, 10 Dec 2008 12:43:29 +0000 (+0000) Subject: MN10300: Fix the preemption resume_kernel() routine X-Git-Tag: v2.6.28-rc8~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=24646bd2269fbca95367bfd3eafbc9f7ade2e980;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index b7cbb1487af..62fba8aa9b6 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S @@ -180,6 +180,7 @@ ENTRY(resume_userspace) #ifdef CONFIG_PREEMPT ENTRY(resume_kernel) + __cli mov (TI_preempt_count,a2),d0 # non-zero preempt_count ? cmp 0,d0 bne restore_all @@ -190,7 +191,7 @@ need_resched: mov (REG_EPSW,fp),d0 and EPSW_IM,d0 cmp EPSW_IM_7,d0 # interrupts off (exception path) ? - beq restore_all + bne restore_all call preempt_schedule_irq[],0 jmp need_resched #endif