aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:05:51 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:08:54 -0500
commitb7f6961d83d480c8636543d1d0dbb9584b878a68 (patch)
tree775880d505a3ed00e7bc72a5079183e792325d89
parent04fe6faf10c310480151667e7fe3e06df4208a8e (diff)
[PATCH] v850: task_stack_page(), 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>
-rw-r--r--arch/v850/kernel/process.c2
-rw-r--r--arch/v850/kernel/ptrace.c2
-rw-r--r--include/asm-v850/processor.h8
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c
index 062ffa0a9998..eb909937958b 100644
--- a/arch/v850/kernel/process.c
+++ b/arch/v850/kernel/process.c
@@ -114,7 +114,7 @@ int copy_thread (int nr, unsigned long clone_flags,
114 struct task_struct *p, struct pt_regs *regs) 114 struct task_struct *p, struct pt_regs *regs)
115{ 115{
116 /* Start pushing stuff from the top of the child's kernel stack. */ 116 /* Start pushing stuff from the top of the child's kernel stack. */
117 unsigned long orig_ksp = (unsigned long)p->thread_info + THREAD_SIZE; 117 unsigned long orig_ksp = task_tos(p);
118 unsigned long ksp = orig_ksp; 118 unsigned long ksp = orig_ksp;
119 /* We push two `state save' stack fames (see entry.S) on the new 119 /* We push two `state save' stack fames (see entry.S) on the new
120 kernel stack: 120 kernel stack:
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c
index 18492d02aaf6..67e057509664 100644
--- a/arch/v850/kernel/ptrace.c
+++ b/arch/v850/kernel/ptrace.c
@@ -58,7 +58,7 @@ static v850_reg_t *reg_save_addr (unsigned reg_offs, struct task_struct *t)
58 regs = thread_saved_regs (t); 58 regs = thread_saved_regs (t);
59 else 59 else
60 /* Register saved during kernel entry (or not available). */ 60 /* Register saved during kernel entry (or not available). */
61 regs = task_regs (t); 61 regs = task_pt_regs (t);
62 62
63 return (v850_reg_t *)((char *)regs + reg_offs); 63 return (v850_reg_t *)((char *)regs + reg_offs);
64} 64}
diff --git a/include/asm-v850/processor.h b/include/asm-v850/processor.h
index 98f929427d3d..2d31308935a0 100644
--- a/include/asm-v850/processor.h
+++ b/include/asm-v850/processor.h
@@ -98,10 +98,10 @@ unsigned long get_wchan (struct task_struct *p);
98 98
99 99
100/* Return some info about the user process TASK. */ 100/* Return some info about the user process TASK. */
101#define task_tos(task) ((unsigned long)(task)->thread_info + THREAD_SIZE) 101#define task_tos(task) ((unsigned long)task_stack_page(task) + THREAD_SIZE)
102#define task_regs(task) ((struct pt_regs *)task_tos (task) - 1) 102#define task_pt_regs(task) ((struct pt_regs *)task_tos (task) - 1)
103#define task_sp(task) (task_regs (task)->gpr[GPR_SP]) 103#define task_sp(task) (task_pt_regs (task)->gpr[GPR_SP])
104#define task_pc(task) (task_regs (task)->pc) 104#define task_pc(task) (task_pt_regs (task)->pc)
105/* Grotty old names for some. */ 105/* Grotty old names for some. */
106#define KSTK_EIP(task) task_pc (task) 106#define KSTK_EIP(task) task_pc (task)
107#define KSTK_ESP(task) task_sp (task) 107#define KSTK_ESP(task) task_sp (task)