aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/ptrace.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-17 16:28:00 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-02-17 16:28:00 +0900
commit9edef28653a519bf0a48250f36cce96b1736ec4e (patch)
tree68049b29e69228fe0cdf26b27a3743928c5e7fdb /arch/sh/include/asm/ptrace.h
parentsh: PMB tidying. (diff)
downloadlinux-dev-9edef28653a519bf0a48250f36cce96b1736ec4e.tar.xz
linux-dev-9edef28653a519bf0a48250f36cce96b1736ec4e.zip
sh: uncached mapping helpers.
This adds some helper routines for uncached mapping support. This simplifies some of the cases where we need to check the uncached mapping boundaries in addition to giving us a centralized location for building more complex manipulation on top of. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/ptrace.h')
-rw-r--r--arch/sh/include/asm/ptrace.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index e879dffa324b..e11b14ea2c43 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -139,15 +139,8 @@ static inline unsigned long profile_pc(struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);
-#ifdef CONFIG_UNCACHED_MAPPING
- /*
- * If PC points in to the uncached mapping, fix it up and hand
- * back the cached equivalent.
- */
- if ((pc >= (memory_start + cached_to_uncached)) &&
- (pc < (memory_start + cached_to_uncached + uncached_size)))
- pc -= cached_to_uncached;
-#endif
+ if (virt_addr_uncached(pc))
+ return CAC_ADDR(pc);
return pc;
}