aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/signal_32.c
diff options
context:
space:
mode:
authorChris Smith <chris.smith@st.com>2008-07-02 02:17:11 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 05:10:32 -0400
commit09b5a10c1944214a6008712bfa92b29f00b84a1a (patch)
tree0769016c78424356596bb0a8d854056b083246ef /arch/sh/kernel/signal_32.c
parent3611ee7acc113e5e482b7d20d5133935226f3129 (diff)
sh: Optimized flush_icache_range() implementation.
Add implementation of flush_icache_range() suitable for signal handler and kprobes. Remove flush_cache_sigtramp() and change signal.c to use flush_icache_range(). Signed-off-by: Chris Smith <chris.smith@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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 46170a9a7221..eee29257a8ae 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -398,10 +398,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
398 pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", 398 pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
399 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); 399 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);
400 400
401 flush_cache_sigtramp(regs->pr); 401 flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
402
403 if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode))
404 flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES);
405 402
406 return 0; 403 return 0;
407 404
@@ -486,10 +483,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
486 pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n", 483 pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
487 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr); 484 current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);
488 485
489 flush_cache_sigtramp(regs->pr); 486 flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
490
491 if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode))
492 flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES);
493 487
494 return 0; 488 return 0;
495 489