提交 b7f6961d 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] v850: task_stack_page(), task_pt_regs()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 04fe6faf
...@@ -114,7 +114,7 @@ int copy_thread (int nr, unsigned long clone_flags, ...@@ -114,7 +114,7 @@ int copy_thread (int nr, unsigned long clone_flags,
struct task_struct *p, struct pt_regs *regs) struct task_struct *p, struct pt_regs *regs)
{ {
/* Start pushing stuff from the top of the child's kernel stack. */ /* Start pushing stuff from the top of the child's kernel stack. */
unsigned long orig_ksp = (unsigned long)p->thread_info + THREAD_SIZE; unsigned long orig_ksp = task_tos(p);
unsigned long ksp = orig_ksp; unsigned long ksp = orig_ksp;
/* We push two `state save' stack fames (see entry.S) on the new /* We push two `state save' stack fames (see entry.S) on the new
kernel stack: kernel stack:
......
...@@ -58,7 +58,7 @@ static v850_reg_t *reg_save_addr (unsigned reg_offs, struct task_struct *t) ...@@ -58,7 +58,7 @@ static v850_reg_t *reg_save_addr (unsigned reg_offs, struct task_struct *t)
regs = thread_saved_regs (t); regs = thread_saved_regs (t);
else else
/* Register saved during kernel entry (or not available). */ /* Register saved during kernel entry (or not available). */
regs = task_regs (t); regs = task_pt_regs (t);
return (v850_reg_t *)((char *)regs + reg_offs); return (v850_reg_t *)((char *)regs + reg_offs);
} }
......
...@@ -98,10 +98,10 @@ unsigned long get_wchan (struct task_struct *p); ...@@ -98,10 +98,10 @@ unsigned long get_wchan (struct task_struct *p);
/* Return some info about the user process TASK. */ /* Return some info about the user process TASK. */
#define task_tos(task) ((unsigned long)(task)->thread_info + THREAD_SIZE) #define task_tos(task) ((unsigned long)task_stack_page(task) + THREAD_SIZE)
#define task_regs(task) ((struct pt_regs *)task_tos (task) - 1) #define task_pt_regs(task) ((struct pt_regs *)task_tos (task) - 1)
#define task_sp(task) (task_regs (task)->gpr[GPR_SP]) #define task_sp(task) (task_pt_regs (task)->gpr[GPR_SP])
#define task_pc(task) (task_regs (task)->pc) #define task_pc(task) (task_pt_regs (task)->pc)
/* Grotty old names for some. */ /* Grotty old names for some. */
#define KSTK_EIP(task) task_pc (task) #define KSTK_EIP(task) task_pc (task)
#define KSTK_ESP(task) task_sp (task) #define KSTK_ESP(task) task_sp (task)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册