Commit a6ea5b45 authored by Al Viro's avatar Al Viro

xtensa: switch to ->regset_get()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bd0409a8
...@@ -37,8 +37,7 @@ ...@@ -37,8 +37,7 @@
static int gpr_get(struct task_struct *target, static int gpr_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)
{ {
struct pt_regs *regs = task_pt_regs(target); struct pt_regs *regs = task_pt_regs(target);
struct user_pt_regs newregs = { struct user_pt_regs newregs = {
...@@ -60,8 +59,7 @@ static int gpr_get(struct task_struct *target, ...@@ -60,8 +59,7 @@ static int gpr_get(struct task_struct *target,
regs->areg, regs->areg,
(WSBITS - regs->windowbase) * 16); (WSBITS - regs->windowbase) * 16);
return user_regset_copyout(&pos, &count, &kbuf, &ubuf, return membuf_write(&to, &newregs, sizeof(newregs));
&newregs, 0, -1);
} }
static int gpr_set(struct task_struct *target, static int gpr_set(struct task_struct *target,
...@@ -115,8 +113,7 @@ static int gpr_set(struct task_struct *target, ...@@ -115,8 +113,7 @@ static int gpr_set(struct task_struct *target,
static int tie_get(struct task_struct *target, static int tie_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)
{ {
int ret; int ret;
struct pt_regs *regs = task_pt_regs(target); struct pt_regs *regs = task_pt_regs(target);
...@@ -141,8 +138,7 @@ static int tie_get(struct task_struct *target, ...@@ -141,8 +138,7 @@ static int tie_get(struct task_struct *target,
newregs->cp6 = ti->xtregs_cp.cp6; newregs->cp6 = ti->xtregs_cp.cp6;
newregs->cp7 = ti->xtregs_cp.cp7; newregs->cp7 = ti->xtregs_cp.cp7;
#endif #endif
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, ret = membuf_write(&to, newregs, sizeof(*newregs));
newregs, 0, -1);
kfree(newregs); kfree(newregs);
return ret; return ret;
} }
...@@ -197,7 +193,7 @@ static const struct user_regset xtensa_regsets[] = { ...@@ -197,7 +193,7 @@ static const struct user_regset xtensa_regsets[] = {
.n = sizeof(struct user_pt_regs) / sizeof(u32), .n = sizeof(struct user_pt_regs) / sizeof(u32),
.size = sizeof(u32), .size = sizeof(u32),
.align = sizeof(u32), .align = sizeof(u32),
.get = gpr_get, .regset_get = gpr_get,
.set = gpr_set, .set = gpr_set,
}, },
[REGSET_TIE] = { [REGSET_TIE] = {
...@@ -205,7 +201,7 @@ static const struct user_regset xtensa_regsets[] = { ...@@ -205,7 +201,7 @@ static const struct user_regset xtensa_regsets[] = {
.n = sizeof(elf_xtregs_t) / sizeof(u32), .n = sizeof(elf_xtregs_t) / sizeof(u32),
.size = sizeof(u32), .size = sizeof(u32),
.align = sizeof(u32), .align = sizeof(u32),
.get = tie_get, .regset_get = tie_get,
.set = tie_set, .set = tie_set,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment