summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/signal.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-09-28 15:21:51 +0900
committerPaul Mundt <lethal@linux-sh.org>2007-09-28 15:21:51 +0900
commite5137682a1ad48bc5306070935c277e262f119ef (patch)
tree97b11fe0f9bdf0249e996808d374bf4e2d59aadd /arch/sh/kernel/signal.c
parent023ef184fff6ac2e7cba345708f35536a2a419cb (diff)
downloadlinux-e5137682a1ad48bc5306070935c277e262f119ef.tar.gz
linux-e5137682a1ad48bc5306070935c277e262f119ef.tar.bz2
linux-e5137682a1ad48bc5306070935c277e262f119ef.zip
sh: Tidy up gUSA preempt handling.
Currently gUSA toggles hardirqs to disable preemption in the signal handler. Make the preemption toggling explicit, and kill off some CONFIG_PREEMPT ifdefs in the process. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/signal.c')
-rw-r--r--arch/sh/kernel/signal.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c
index 706d81ccd101..0f657d32ceb9 100644
--- a/arch/sh/kernel/signal.c
+++ b/arch/sh/kernel/signal.c
@@ -509,11 +509,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
}
} else {
/* gUSA handling */
-#ifdef CONFIG_PREEMPT
- unsigned long flags;
+ preempt_disable();
- local_irq_save(flags);
-#endif
if (regs->regs[15] >= 0xc0000000) {
int offset = (int)regs->regs[15];
@@ -524,9 +521,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
regs->pc = regs->regs[0] + offset -
instruction_size(ctrl_inw(regs->pc-4));
}
-#ifdef CONFIG_PREEMPT
- local_irq_restore(flags);
-#endif
+
+ preempt_enable_no_resched();
}
/* Set up the stack frame */