summaryrefslogtreecommitdiff
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorChris Smith <chris.smith@st.com>2008-07-02 15:17:11 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 18:10:32 +0900
commit09b5a10c1944214a6008712bfa92b29f00b84a1a (patch)
tree0769016c78424356596bb0a8d854056b083246ef /arch/sh/kernel
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')
-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,
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_cache_sigtramp(regs->pr);
-
- if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode))
- flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES);
+ flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
return 0;
@@ -486,10 +483,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
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_cache_sigtramp(regs->pr);
-
- if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode))
- flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES);
+ flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
return 0;