Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107507
b: refs/heads/master
c: 6717c28
h: refs/heads/master
i:
  107505: 02f1a37
  107503: b295a27
v: v3
  • Loading branch information
David S. Miller committed Aug 1, 2008
1 parent 83fcba7 commit 628dead
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 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: 9c636e30a33aa37873c53977c429f0fdad4ec0eb
refs/heads/master: 6717c282e407650c29e7b058623d89f543015a33
20 changes: 10 additions & 10 deletions trunk/arch/sparc/include/asm/ptrace_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ struct pt_regs {
#define UREG_FP UREG_I6
#define UREG_RETPC UREG_I7

static inline bool pt_regs_is_syscall(struct pt_regs *regs)
{
return (regs->psr & PSR_SYSCALL);
}

static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
{
return (regs->psr &= ~PSR_SYSCALL);
}

/* A register window */
struct reg_window {
unsigned long locals[8];
Expand All @@ -72,6 +62,16 @@ struct sparc_stackf {

#ifdef __KERNEL__

static inline bool pt_regs_is_syscall(struct pt_regs *regs)
{
return (regs->psr & PSR_SYSCALL);
}

static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
{
return (regs->psr &= ~PSR_SYSCALL);
}

#define user_mode(regs) (!((regs)->psr & PSR_PS))
#define instruction_pointer(regs) ((regs)->pc)
#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
Expand Down
31 changes: 15 additions & 16 deletions trunk/arch/sparc/include/asm/ptrace_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,6 @@ struct pt_regs {
unsigned int magic;
};

static inline int pt_regs_trap_type(struct pt_regs *regs)
{
return regs->magic & 0x1ff;
}

static inline bool pt_regs_is_syscall(struct pt_regs *regs)
{
return (regs->tstate & TSTATE_SYSCALL);
}

static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
{
return (regs->tstate &= ~TSTATE_SYSCALL);
}

struct pt_regs32 {
unsigned int psr;
unsigned int pc;
Expand Down Expand Up @@ -128,6 +113,21 @@ struct sparc_trapf {

#ifdef __KERNEL__

static inline int pt_regs_trap_type(struct pt_regs *regs)
{
return regs->magic & 0x1ff;
}

static inline bool pt_regs_is_syscall(struct pt_regs *regs)
{
return (regs->tstate & TSTATE_SYSCALL);
}

static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
{
return (regs->tstate &= ~TSTATE_SYSCALL);
}

struct global_reg_snapshot {
unsigned long tstate;
unsigned long tpc;
Expand All @@ -154,7 +154,6 @@ extern unsigned long profile_pc(struct pt_regs *);
#define profile_pc(regs) instruction_pointer(regs)
#endif
extern void show_regs(struct pt_regs *);
extern void __show_regs(struct pt_regs *);
#endif

#else /* __ASSEMBLY__ */
Expand Down

0 comments on commit 628dead

Please sign in to comment.