Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18093
b: refs/heads/master
c: 95ca0dc
h: refs/heads/master
i:
  18091: 5d1812d
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jan 12, 2006
1 parent f6d52f7 commit 720f7bc
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cec6fd1370807f98934e84c9e6147335b81d8a5
refs/heads/master: 95ca0dc603ab58f3e4c5a1c23f675bd1f5b5fef3
4 changes: 2 additions & 2 deletions trunk/arch/cris/arch-v10/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void hard_reset_now (void)
*/
unsigned long thread_saved_pc(struct task_struct *t)
{
return (unsigned long)user_regs(t->thread_info)->irp;
return task_pt_regs(t)->irp;
}

static void kernel_thread_helper(void* dummy, int (*fn)(void *), void * arg)
Expand Down Expand Up @@ -128,7 +128,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
* remember that the task_struct doubles as the kernel stack for the task
*/

childregs = user_regs(p->thread_info);
childregs = task_pt_regs(p);

*childregs = *regs; /* struct copy of pt_regs */

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/cris/arch-v10/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inline long get_reg(struct task_struct *task, unsigned int regno)
if (regno == PT_USP)
return task->thread.usp;
else if (regno < PT_MAX)
return ((unsigned long *)user_regs(task->thread_info))[regno];
return ((unsigned long *)task_pt_regs(task))[regno];
else
return 0;
}
Expand All @@ -51,7 +51,7 @@ inline int put_reg(struct task_struct *task, unsigned int regno,
if (regno == PT_USP)
task->thread.usp = data;
else if (regno < PT_MAX)
((unsigned long *)user_regs(task->thread_info))[regno] = data;
((unsigned long *)task_pt_regs(task))[regno] = data;
else
return -1;
return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/cris/arch-v32/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ hard_reset_now(void)
*/
unsigned long thread_saved_pc(struct task_struct *t)
{
return (unsigned long)user_regs(t->thread_info)->erp;
return task_pt_regs(t)->erp;
}

static void
Expand Down Expand Up @@ -148,7 +148,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
* fix it up. Note: the task_struct doubles as the kernel stack for the
* task.
*/
childregs = user_regs(p->thread_info);
childregs = task_pt_regs(p);
*childregs = *regs; /* Struct copy of pt_regs. */
p->set_child_tid = p->clear_child_tid = NULL;
childregs->r10 = 0; /* Child returns 0 after a fork/clone. */
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/cris/arch-v32/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ long get_reg(struct task_struct *task, unsigned int regno)
unsigned long ret;

if (regno <= PT_EDA)
ret = ((unsigned long *)user_regs(task->thread_info))[regno];
ret = ((unsigned long *)task_pt_regs(task))[regno];
else if (regno == PT_USP)
ret = task->thread.usp;
else if (regno == PT_PPC)
Expand All @@ -65,13 +65,13 @@ long get_reg(struct task_struct *task, unsigned int regno)
int put_reg(struct task_struct *task, unsigned int regno, unsigned long data)
{
if (regno <= PT_EDA)
((unsigned long *)user_regs(task->thread_info))[regno] = data;
((unsigned long *)task_pt_regs(task))[regno] = data;
else if (regno == PT_USP)
task->thread.usp = data;
else if (regno == PT_PPC) {
/* Write pseudo-PC to ERP only if changed. */
if (data != get_pseudo_pc(task))
((unsigned long *)user_regs(task->thread_info))[PT_ERP] = data;
task_pt_regs(task)->erp = data;
} else if (regno <= PT_MAX)
return put_debugreg(task->pid, regno, data);
else
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/asm-cris/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ struct task_struct;
* Dito but for the currently running task
*/

#define current_regs() user_regs(current->thread_info)
#define task_pt_regs(task) user_regs(task_thread_info(task))
#define current_regs() task_pt_regs(current)

static inline void prepare_to_copy(struct task_struct *tsk)
{
Expand Down

0 comments on commit 720f7bc

Please sign in to comment.