瀏覽代碼

sh: Follow gUSA preempt changes in __switch_to().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Paul Mundt 17 年之前
父節點
當前提交
995bb781d4
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      arch/sh/kernel/process.c

+ 3 - 3
arch/sh/kernel/process.c

@@ -19,6 +19,7 @@
 #include <linux/tick.h>
 #include <linux/tick.h>
 #include <linux/reboot.h>
 #include <linux/reboot.h>
 #include <linux/fs.h>
 #include <linux/fs.h>
+#include <linux/preempt.h>
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/mmu_context.h>
 #include <asm/pgalloc.h>
 #include <asm/pgalloc.h>
@@ -351,10 +352,9 @@ struct task_struct *__switch_to(struct task_struct *prev,
 
 
 #ifdef CONFIG_PREEMPT
 #ifdef CONFIG_PREEMPT
 	{
 	{
-		unsigned long flags;
 		struct pt_regs *regs;
 		struct pt_regs *regs;
 
 
-		local_irq_save(flags);
+		preempt_disable();
 		regs = task_pt_regs(prev);
 		regs = task_pt_regs(prev);
 		if (user_mode(regs) && regs->regs[15] >= 0xc0000000) {
 		if (user_mode(regs) && regs->regs[15] >= 0xc0000000) {
 			int offset = (int)regs->regs[15];
 			int offset = (int)regs->regs[15];
@@ -365,7 +365,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
 				/* Go to rewind point */
 				/* Go to rewind point */
 				regs->pc = regs->regs[0] + offset;
 				regs->pc = regs->regs[0] + offset;
 		}
 		}
-		local_irq_restore(flags);
+		preempt_enable_no_resched();
 	}
 	}
 #endif
 #endif