Skip to content

Commit 995bb78

Browse files
committed
sh: Follow gUSA preempt changes in __switch_to().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent e513768 commit 995bb78

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/sh/kernel/process.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/tick.h>
2020
#include <linux/reboot.h>
2121
#include <linux/fs.h>
22+
#include <linux/preempt.h>
2223
#include <asm/uaccess.h>
2324
#include <asm/mmu_context.h>
2425
#include <asm/pgalloc.h>
@@ -351,10 +352,9 @@ struct task_struct *__switch_to(struct task_struct *prev,
351352

352353
#ifdef CONFIG_PREEMPT
353354
{
354-
unsigned long flags;
355355
struct pt_regs *regs;
356356

357-
local_irq_save(flags);
357+
preempt_disable();
358358
regs = task_pt_regs(prev);
359359
if (user_mode(regs) && regs->regs[15] >= 0xc0000000) {
360360
int offset = (int)regs->regs[15];
@@ -365,7 +365,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
365365
/* Go to rewind point */
366366
regs->pc = regs->regs[0] + offset;
367367
}
368-
local_irq_restore(flags);
368+
preempt_enable_no_resched();
369369
}
370370
#endif
371371

0 commit comments

Comments
 (0)