Skip to content

Commit

Permalink
[POWERPC] Uninline common ptrace bits
Browse files Browse the repository at this point in the history
This folds back the ptrace-common.h bits back into ptrace.c and removes
that file. The FSL SPE bits from ptrace-ppc32.h are folded back in as
well.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jun 14, 2007
1 parent e17666b commit 865418d
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 254 deletions.
177 changes: 0 additions & 177 deletions arch/powerpc/kernel/ptrace-common.h

This file was deleted.

65 changes: 0 additions & 65 deletions arch/powerpc/kernel/ptrace-ppc32.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,69 +32,4 @@
#define PT_MUNGE_MSR(msr, task) (msr)


#ifdef CONFIG_SPE

/*
* For get_evrregs/set_evrregs functions 'data' has the following layout:
*
* struct {
* u32 evr[32];
* u64 acc;
* u32 spefscr;
* }
*/

/*
* Get contents of SPE register state in task TASK.
*/
static inline int get_evrregs(unsigned long *data, struct task_struct *task)
{
int i;

if (!access_ok(VERIFY_WRITE, data, 35 * sizeof(unsigned long)))
return -EFAULT;

/* copy SPEFSCR */
if (__put_user(task->thread.spefscr, &data[34]))
return -EFAULT;

/* copy SPE registers EVR[0] .. EVR[31] */
for (i = 0; i < 32; i++, data++)
if (__put_user(task->thread.evr[i], data))
return -EFAULT;

/* copy ACC */
if (__put_user64(task->thread.acc, (unsigned long long *)data))
return -EFAULT;

return 0;
}

/*
* Write contents of SPE register state into task TASK.
*/
static inline int set_evrregs(struct task_struct *task, unsigned long *data)
{
int i;

if (!access_ok(VERIFY_READ, data, 35 * sizeof(unsigned long)))
return -EFAULT;

/* copy SPEFSCR */
if (__get_user(task->thread.spefscr, &data[34]))
return -EFAULT;

/* copy SPE registers EVR[0] .. EVR[31] */
for (i = 0; i < 32; i++, data++)
if (__get_user(task->thread.evr[i], data))
return -EFAULT;
/* copy ACC */
if (__get_user64(task->thread.acc, (unsigned long long*)data))
return -EFAULT;

return 0;
}
#endif /* CONFIG_SPE */


#endif /* _POWERPC_PTRACE_PPC32_H */
Loading

0 comments on commit 865418d

Please sign in to comment.