Skip to content

Commit

Permalink
sh: Follow gUSA preempt changes in __switch_to().
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Sep 28, 2007
1 parent e513768 commit 995bb78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/sh/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/tick.h>
#include <linux/reboot.h>
#include <linux/fs.h>
#include <linux/preempt.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/pgalloc.h>
Expand Down Expand Up @@ -351,10 +352,9 @@ struct task_struct *__switch_to(struct task_struct *prev,

#ifdef CONFIG_PREEMPT
{
unsigned long flags;
struct pt_regs *regs;

local_irq_save(flags);
preempt_disable();
regs = task_pt_regs(prev);
if (user_mode(regs) && regs->regs[15] >= 0xc0000000) {
int offset = (int)regs->regs[15];
Expand All @@ -365,7 +365,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
/* Go to rewind point */
regs->pc = regs->regs[0] + offset;
}
local_irq_restore(flags);
preempt_enable_no_resched();
}
#endif

Expand Down

0 comments on commit 995bb78

Please sign in to comment.