diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2008-07-02 17:51:23 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 18:10:33 +0900 |
commit | f2fb4e4f647dabf1177d3ce164988e73482d76b1 (patch) | |
tree | 5288184d2d8535c826c8b3c33d79b2529c83542b /arch/sh/kernel/signal_32.c | |
parent | 068f59143d821553e7a55cdbd69142b05e245d47 (diff) | |
download | blackbird-op-linux-f2fb4e4f647dabf1177d3ce164988e73482d76b1.tar.gz blackbird-op-linux-f2fb4e4f647dabf1177d3ce164988e73482d76b1.zip |
sh: Conditionally re-enable IRQs in fault path.
The current kernel behaviour is to reenable interrupts unconditionally
when taking a page fault. This patch changes this to only enable them
if interrupts were previously enabled.
It also fixes a problem seen with this fix in place: the kernel previously
flushed the vsyscall page when handling a signal, which is not only
unncessary, but caused a possible sleep with interrupts disabled.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/signal_32.c')
-rw-r--r-- | arch/sh/kernel/signal_32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index eee29257a8ae..4bbbde895a53 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c @@ -373,6 +373,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, err |= __put_user(OR_R0_R0, &frame->retcode[6]); err |= __put_user((__NR_sigreturn), &frame->retcode[7]); regs->pr = (unsigned long) frame->retcode; + flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode)); } if (err) @@ -398,8 +399,6 @@ static int setup_frame(int sig, struct k_sigaction *ka, pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); - flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode)); - return 0; give_sigsegv: |