summaryrefslogtreecommitdiff
path: root/include/asm-sh
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 01:05:44 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 09:08:52 -0800
commit3cf0f4ece9f1680e54b154b1e38baaf6ace20a62 (patch)
treeeaebb77428101f5093aa7c0fa8cbc008c9d61ba2 /include/asm-sh
parent26ecbdea4bf46b0165db4aafd8e4981b4db53936 (diff)
downloadlinux-3.10-3cf0f4ece9f1680e54b154b1e38baaf6ace20a62.tar.gz
linux-3.10-3cf0f4ece9f1680e54b154b1e38baaf6ace20a62.tar.bz2
linux-3.10-3cf0f4ece9f1680e54b154b1e38baaf6ace20a62.zip
[PATCH] sh: task_pt_regs()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/ptrace.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-sh/ptrace.h b/include/asm-sh/ptrace.h
index 0f75e16a741..85aa0f4de81 100644
--- a/include/asm-sh/ptrace.h
+++ b/include/asm-sh/ptrace.h
@@ -91,6 +91,16 @@ struct pt_dspregs {
#define instruction_pointer(regs) ((regs)->pc)
extern void show_regs(struct pt_regs *);
+#ifdef CONFIG_SH_DSP
+#define task_pt_regs(task) \
+ ((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \
+ - sizeof(struct pt_dspregs) - sizeof(unsigned long)) - 1)
+#else
+#define task_pt_regs(task) \
+ ((struct pt_regs *) ((unsigned long)(task)->thread_info + THREAD_SIZE \
+ - sizeof(unsigned long)) - 1)
+#endif
+
static inline unsigned long profile_pc(struct pt_regs *regs)
{
unsigned long pc = instruction_pointer(regs);