Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18065
b: refs/heads/master
c: 26ecbde
h: refs/heads/master
i:
  18063: 5249f15
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jan 12, 2006
1 parent 90b7a8a commit 46f4ef8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 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: ee3eea165e706a3ce8a53693e810403f65239ebb
refs/heads/master: 26ecbdea4bf46b0165db4aafd8e4981b4db53936
12 changes: 6 additions & 6 deletions trunk/arch/sparc64/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
case PTRACE_GETREGS: {
struct pt_regs32 __user *pregs =
(struct pt_regs32 __user *) addr;
struct pt_regs *cregs = child->thread_info->kregs;
struct pt_regs *cregs = task_pt_regs(child);
int rval;

if (__put_user(tstate_to_psr(cregs->tstate), (&pregs->psr)) ||
Expand All @@ -320,7 +320,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)

case PTRACE_GETREGS64: {
struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
struct pt_regs *cregs = child->thread_info->kregs;
struct pt_regs *cregs = task_pt_regs(child);
unsigned long tpc = cregs->tpc;
int rval;

Expand Down Expand Up @@ -348,7 +348,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
case PTRACE_SETREGS: {
struct pt_regs32 __user *pregs =
(struct pt_regs32 __user *) addr;
struct pt_regs *cregs = child->thread_info->kregs;
struct pt_regs *cregs = task_pt_regs(child);
unsigned int psr, pc, npc, y;
int i;

Expand Down Expand Up @@ -381,7 +381,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs)

case PTRACE_SETREGS64: {
struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
struct pt_regs *cregs = child->thread_info->kregs;
struct pt_regs *cregs = task_pt_regs(child);
unsigned long tstate, tpc, tnpc, y;
int i;

Expand Down Expand Up @@ -562,8 +562,8 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
#ifdef DEBUG_PTRACE
printk("CONT: %s [%d]: set exit_code = %x %lx %lx\n", child->comm,
child->pid, child->exit_code,
child->thread_info->kregs->tpc,
child->thread_info->kregs->tnpc);
task_pt_regs(child)->tpc,
task_pt_regs(child)->tnpc);

#endif
wake_up_process(child);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-sparc64/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ typedef struct {
#endif

#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread_info->kregs); 1; })
({ ELF_CORE_COPY_REGS((*(__elf_regs)), task_pt_regs(__tsk)); 1; })

/*
* This is used to ensure we don't load something for the wrong architecture.
Expand Down
5 changes: 3 additions & 2 deletions trunk/include/asm-sparc64/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);

extern unsigned long get_wchan(struct task_struct *task);

#define KSTK_EIP(tsk) ((tsk)->thread_info->kregs->tpc)
#define KSTK_ESP(tsk) ((tsk)->thread_info->kregs->u_regs[UREG_FP])
#define task_pt_regs(tsk) (task_thread_info(tsk)->kregs)
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->tpc)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->u_regs[UREG_FP])

#define cpu_relax() barrier()

Expand Down

0 comments on commit 46f4ef8

Please sign in to comment.