Skip to content

Commit dcad785

Browse files
author
Al Viro
committed
csky: switch to ->regset_get()
NB: WTF is fpregs_get() playing at??? Signed-off-by: Al Viro <[email protected]>
1 parent a6ea5b4 commit dcad785

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

arch/csky/kernel/ptrace.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,14 @@ enum csky_regset {
7676

7777
static int gpr_get(struct task_struct *target,
7878
const struct user_regset *regset,
79-
unsigned int pos, unsigned int count,
80-
void *kbuf, void __user *ubuf)
79+
struct membuf to)
8180
{
82-
struct pt_regs *regs;
83-
84-
regs = task_pt_regs(target);
81+
struct pt_regs *regs = task_pt_regs(target);
8582

8683
/* Abiv1 regs->tls is fake and we need sync here. */
8784
regs->tls = task_thread_info(target)->tp_value;
8885

89-
return user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
86+
return membuf_write(&to, regs, sizeof(regs));
9087
}
9188

9289
static int gpr_set(struct task_struct *target,
@@ -114,8 +111,7 @@ static int gpr_set(struct task_struct *target,
114111

115112
static int fpr_get(struct task_struct *target,
116113
const struct user_regset *regset,
117-
unsigned int pos, unsigned int count,
118-
void *kbuf, void __user *ubuf)
114+
struct membuf to)
119115
{
120116
struct user_fp *regs = (struct user_fp *)&target->thread.user_fp;
121117

@@ -131,9 +127,9 @@ static int fpr_get(struct task_struct *target,
131127
for (i = 0; i < 32; i++)
132128
tmp.vr[64 + i] = regs->vr[32 + i];
133129

134-
return user_regset_copyout(&pos, &count, &kbuf, &ubuf, &tmp, 0, -1);
130+
return membuf_write(&to, &tmp, sizeof(tmp));
135131
#else
136-
return user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
132+
return membuf_write(&to, regs, sizeof(*regs));
137133
#endif
138134
}
139135

@@ -173,16 +169,16 @@ static const struct user_regset csky_regsets[] = {
173169
.n = sizeof(struct pt_regs) / sizeof(u32),
174170
.size = sizeof(u32),
175171
.align = sizeof(u32),
176-
.get = &gpr_get,
177-
.set = &gpr_set,
172+
.regset_get = gpr_get,
173+
.set = gpr_set,
178174
},
179175
[REGSET_FPR] = {
180176
.core_note_type = NT_PRFPREG,
181177
.n = sizeof(struct user_fp) / sizeof(u32),
182178
.size = sizeof(u32),
183179
.align = sizeof(u32),
184-
.get = &fpr_get,
185-
.set = &fpr_set,
180+
.regset_get = fpr_get,
181+
.set = fpr_set,
186182
},
187183
};
188184

0 commit comments

Comments
 (0)