/* Write a general register set. As for PTRACE_GETREGS, we always use the 64-bit format. On a 32-bit kernel only the lower order half (according to endianness) will be used.  */
int ptrace_setregs(struct task_struct *child, __s64 __user *data)
/* Write a general register set. As for PTRACE_GETREGS, we always use the 64-bit format. On a 32-bit kernel only the lower order half (according to endianness) will be used.  */
int ptrace_setregs(struct task_struct *child, __s64 __user *data)
{
	struct pt_regs *regs;
	int i;
	if (!access_ok(VERIFY_READ, data, 38 * 8))
		return -EIO;
	regs = task_pt_regs(child);
	for (i = 0; i < 32; i++)
		__get_user(regs->regs[i], data + i);
	__get_user(regs->lo, data + EF_LO - EF_R0);
	__get_user(regs->hi, data + EF_HI - EF_R0);
	__get_user(regs->cp0_epc, data + EF_CP0_EPC - EF_R0);
	return 0;
}