openrisc: switch to ->regset_get()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -44,29 +44,15 @@
|
|||||||
*/
|
*/
|
||||||
static int genregs_get(struct task_struct *target,
|
static int genregs_get(struct task_struct *target,
|
||||||
const struct user_regset *regset,
|
const struct user_regset *regset,
|
||||||
unsigned int pos, unsigned int count,
|
struct membuf to)
|
||||||
void *kbuf, void __user * ubuf)
|
|
||||||
{
|
{
|
||||||
const struct pt_regs *regs = task_pt_regs(target);
|
const struct pt_regs *regs = task_pt_regs(target);
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* r0 */
|
/* r0 */
|
||||||
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf, 0, 4);
|
membuf_zero(&to, 4);
|
||||||
|
membuf_write(&to, regs->gpr + 1, 31 * 4);
|
||||||
if (!ret)
|
membuf_store(&to, regs->pc);
|
||||||
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
return membuf_store(&to, regs->sr);
|
||||||
regs->gpr+1, 4, 4*32);
|
|
||||||
if (!ret)
|
|
||||||
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
||||||
®s->pc, 4*32, 4*33);
|
|
||||||
if (!ret)
|
|
||||||
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
|
|
||||||
®s->sr, 4*33, 4*34);
|
|
||||||
if (!ret)
|
|
||||||
ret = user_regset_copyout_zero(&pos, &count, &kbuf, &ubuf,
|
|
||||||
4*34, -1);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -114,7 +100,7 @@ static const struct user_regset or1k_regsets[] = {
|
|||||||
.n = ELF_NGREG,
|
.n = ELF_NGREG,
|
||||||
.size = sizeof(long),
|
.size = sizeof(long),
|
||||||
.align = sizeof(long),
|
.align = sizeof(long),
|
||||||
.get = genregs_get,
|
.regset_get = genregs_get,
|
||||||
.set = genregs_set,
|
.set = genregs_set,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user