diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:06:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:08:58 -0500 |
commit | 95ca0dc603ab58f3e4c5a1c23f675bd1f5b5fef3 (patch) | |
tree | 367ddcc3858b9c3e852ea2f6bafaffd43424c9e5 /arch/cris/arch-v32 | |
parent | 0cec6fd1370807f98934e84c9e6147335b81d8a5 (diff) |
[PATCH] cris: 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 'arch/cris/arch-v32')
-rw-r--r-- | arch/cris/arch-v32/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/ptrace.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 882be42114f7..e88b13b139d5 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -96,7 +96,7 @@ hard_reset_now(void) | |||
96 | */ | 96 | */ |
97 | unsigned long thread_saved_pc(struct task_struct *t) | 97 | unsigned long thread_saved_pc(struct task_struct *t) |
98 | { | 98 | { |
99 | return (unsigned long)user_regs(t->thread_info)->erp; | 99 | return task_pt_regs(t)->erp; |
100 | } | 100 | } |
101 | 101 | ||
102 | static void | 102 | static void |
@@ -148,7 +148,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
148 | * fix it up. Note: the task_struct doubles as the kernel stack for the | 148 | * fix it up. Note: the task_struct doubles as the kernel stack for the |
149 | * task. | 149 | * task. |
150 | */ | 150 | */ |
151 | childregs = user_regs(p->thread_info); | 151 | childregs = task_pt_regs(p); |
152 | *childregs = *regs; /* Struct copy of pt_regs. */ | 152 | *childregs = *regs; /* Struct copy of pt_regs. */ |
153 | p->set_child_tid = p->clear_child_tid = NULL; | 153 | p->set_child_tid = p->clear_child_tid = NULL; |
154 | childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ | 154 | childregs->r10 = 0; /* Child returns 0 after a fork/clone. */ |
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index 5528b83a622b..82cf2e3624a4 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c | |||
@@ -46,7 +46,7 @@ long get_reg(struct task_struct *task, unsigned int regno) | |||
46 | unsigned long ret; | 46 | unsigned long ret; |
47 | 47 | ||
48 | if (regno <= PT_EDA) | 48 | if (regno <= PT_EDA) |
49 | ret = ((unsigned long *)user_regs(task->thread_info))[regno]; | 49 | ret = ((unsigned long *)task_pt_regs(task))[regno]; |
50 | else if (regno == PT_USP) | 50 | else if (regno == PT_USP) |
51 | ret = task->thread.usp; | 51 | ret = task->thread.usp; |
52 | else if (regno == PT_PPC) | 52 | else if (regno == PT_PPC) |
@@ -65,13 +65,13 @@ long get_reg(struct task_struct *task, unsigned int regno) | |||
65 | int put_reg(struct task_struct *task, unsigned int regno, unsigned long data) | 65 | int put_reg(struct task_struct *task, unsigned int regno, unsigned long data) |
66 | { | 66 | { |
67 | if (regno <= PT_EDA) | 67 | if (regno <= PT_EDA) |
68 | ((unsigned long *)user_regs(task->thread_info))[regno] = data; | 68 | ((unsigned long *)task_pt_regs(task))[regno] = data; |
69 | else if (regno == PT_USP) | 69 | else if (regno == PT_USP) |
70 | task->thread.usp = data; | 70 | task->thread.usp = data; |
71 | else if (regno == PT_PPC) { | 71 | else if (regno == PT_PPC) { |
72 | /* Write pseudo-PC to ERP only if changed. */ | 72 | /* Write pseudo-PC to ERP only if changed. */ |
73 | if (data != get_pseudo_pc(task)) | 73 | if (data != get_pseudo_pc(task)) |
74 | ((unsigned long *)user_regs(task->thread_info))[PT_ERP] = data; | 74 | task_pt_regs(task)->erp = data; |
75 | } else if (regno <= PT_MAX) | 75 | } else if (regno <= PT_MAX) |
76 | return put_debugreg(task->pid, regno, data); | 76 | return put_debugreg(task->pid, regno, data); |
77 | else | 77 | else |