diff options
Diffstat (limited to 'arch/um/sys-i386/ptrace.c')
-rw-r--r-- | arch/um/sys-i386/ptrace.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c index d23b2d3ea384..3375c2717851 100644 --- a/arch/um/sys-i386/ptrace.c +++ b/arch/um/sys-i386/ptrace.c | |||
@@ -145,7 +145,7 @@ int peek_user(struct task_struct *child, long addr, long data) | |||
145 | return put_user(tmp, (unsigned long __user *) data); | 145 | return put_user(tmp, (unsigned long __user *) data); |
146 | } | 146 | } |
147 | 147 | ||
148 | int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) | 148 | static int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) |
149 | { | 149 | { |
150 | int err, n, cpu = ((struct thread_info *) child->stack)->cpu; | 150 | int err, n, cpu = ((struct thread_info *) child->stack)->cpu; |
151 | struct user_i387_struct fpregs; | 151 | struct user_i387_struct fpregs; |
@@ -161,7 +161,7 @@ int get_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) | |||
161 | return n; | 161 | return n; |
162 | } | 162 | } |
163 | 163 | ||
164 | int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) | 164 | static int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) |
165 | { | 165 | { |
166 | int n, cpu = ((struct thread_info *) child->stack)->cpu; | 166 | int n, cpu = ((struct thread_info *) child->stack)->cpu; |
167 | struct user_i387_struct fpregs; | 167 | struct user_i387_struct fpregs; |
@@ -174,7 +174,7 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) | |||
174 | (unsigned long *) &fpregs); | 174 | (unsigned long *) &fpregs); |
175 | } | 175 | } |
176 | 176 | ||
177 | int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) | 177 | static int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) |
178 | { | 178 | { |
179 | int err, n, cpu = ((struct thread_info *) child->stack)->cpu; | 179 | int err, n, cpu = ((struct thread_info *) child->stack)->cpu; |
180 | struct user_fxsr_struct fpregs; | 180 | struct user_fxsr_struct fpregs; |
@@ -190,7 +190,7 @@ int get_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) | |||
190 | return n; | 190 | return n; |
191 | } | 191 | } |
192 | 192 | ||
193 | int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) | 193 | static int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) |
194 | { | 194 | { |
195 | int n, cpu = ((struct thread_info *) child->stack)->cpu; | 195 | int n, cpu = ((struct thread_info *) child->stack)->cpu; |
196 | struct user_fxsr_struct fpregs; | 196 | struct user_fxsr_struct fpregs; |
@@ -206,5 +206,23 @@ int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) | |||
206 | long subarch_ptrace(struct task_struct *child, long request, | 206 | long subarch_ptrace(struct task_struct *child, long request, |
207 | unsigned long addr, unsigned long data) | 207 | unsigned long addr, unsigned long data) |
208 | { | 208 | { |
209 | return -EIO; | 209 | int ret = -EIO; |
210 | void __user *datap = (void __user *) data; | ||
211 | switch (request) { | ||
212 | case PTRACE_GETFPREGS: /* Get the child FPU state. */ | ||
213 | ret = get_fpregs(datap, child); | ||
214 | break; | ||
215 | case PTRACE_SETFPREGS: /* Set the child FPU state. */ | ||
216 | ret = set_fpregs(datap, child); | ||
217 | break; | ||
218 | case PTRACE_GETFPXREGS: /* Get the child FPU state. */ | ||
219 | ret = get_fpxregs(datap, child); | ||
220 | break; | ||
221 | case PTRACE_SETFPXREGS: /* Set the child FPU state. */ | ||
222 | ret = set_fpxregs(datap, child); | ||
223 | break; | ||
224 | default: | ||
225 | ret = -EIO; | ||
226 | } | ||
227 | return ret; | ||
210 | } | 228 | } |