aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-09-28 02:21:51 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-09-28 02:21:51 -0400
commite5137682a1ad48bc5306070935c277e262f119ef (patch)
tree97b11fe0f9bdf0249e996808d374bf4e2d59aadd /arch/sh
parent023ef184fff6ac2e7cba345708f35536a2a419cb (diff)
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')
-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,
509 } 509 }
510 } else { 510 } else {
511 /* gUSA handling */ 511 /* gUSA handling */
512#ifdef CONFIG_PREEMPT 512 preempt_disable();
513 unsigned long flags;
514 513
515 local_irq_save(flags);
516#endif
517 if (regs->regs[15] >= 0xc0000000) { 514 if (regs->regs[15] >= 0xc0000000) {
518 int offset = (int)regs->regs[15]; 515 int offset = (int)regs->regs[15];
519 516
@@ -524,9 +521,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
524 regs->pc = regs->regs[0] + offset - 521 regs->pc = regs->regs[0] + offset -
525 instruction_size(ctrl_inw(regs->pc-4)); 522 instruction_size(ctrl_inw(regs->pc-4));
526 } 523 }
527#ifdef CONFIG_PREEMPT 524
528 local_irq_restore(flags); 525 preempt_enable_no_resched();
529#endif
530 } 526 }
531 527
532 /* Set up the stack frame */ 528 /* Set up the stack frame */