Skip to content

Commit

Permalink
sh: Tidy up gUSA preempt handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Sep 28, 2007
1 parent 023ef18 commit e513768
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions arch/sh/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand All @@ -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 */
Expand Down

0 comments on commit e513768

Please sign in to comment.