Commit e5137682 authored by Paul Mundt's avatar Paul Mundt

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 023ef184
...@@ -509,11 +509,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -509,11 +509,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
} }
} else { } else {
/* gUSA handling */ /* gUSA handling */
#ifdef CONFIG_PREEMPT preempt_disable();
unsigned long flags;
local_irq_save(flags);
#endif
if (regs->regs[15] >= 0xc0000000) { if (regs->regs[15] >= 0xc0000000) {
int offset = (int)regs->regs[15]; int offset = (int)regs->regs[15];
...@@ -524,9 +521,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, ...@@ -524,9 +521,8 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
regs->pc = regs->regs[0] + offset - regs->pc = regs->regs[0] + offset -
instruction_size(ctrl_inw(regs->pc-4)); instruction_size(ctrl_inw(regs->pc-4));
} }
#ifdef CONFIG_PREEMPT
local_irq_restore(flags); preempt_enable_no_resched();
#endif
} }
/* Set up the stack frame */ /* Set up the stack frame */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment