diff options
Diffstat (limited to 'arch/ppc64')
-rw-r--r-- | arch/ppc64/kernel/ptrace.c | 15 | ||||
-rw-r--r-- | arch/ppc64/kernel/ptrace32.c | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/ptrace.c b/arch/ppc64/kernel/ptrace.c index 2993f108d96d..bf7116d4c4c2 100644 --- a/arch/ppc64/kernel/ptrace.c +++ b/arch/ppc64/kernel/ptrace.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * this archive for more details. | 17 | * this archive for more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
@@ -274,6 +275,20 @@ int sys_ptrace(long request, long pid, long addr, long data) | |||
274 | break; | 275 | break; |
275 | } | 276 | } |
276 | 277 | ||
278 | #ifdef CONFIG_ALTIVEC | ||
279 | case PTRACE_GETVRREGS: | ||
280 | /* Get the child altivec register state. */ | ||
281 | flush_altivec_to_thread(child); | ||
282 | ret = get_vrregs((unsigned long __user *)data, child); | ||
283 | break; | ||
284 | |||
285 | case PTRACE_SETVRREGS: | ||
286 | /* Set the child altivec register state. */ | ||
287 | flush_altivec_to_thread(child); | ||
288 | ret = set_vrregs(child, (unsigned long __user *)data); | ||
289 | break; | ||
290 | #endif | ||
291 | |||
277 | default: | 292 | default: |
278 | ret = ptrace_request(child, request, addr, data); | 293 | ret = ptrace_request(child, request, addr, data); |
279 | break; | 294 | break; |
diff --git a/arch/ppc64/kernel/ptrace32.c b/arch/ppc64/kernel/ptrace32.c index 16436426c7e2..4d1568c946cc 100644 --- a/arch/ppc64/kernel/ptrace32.c +++ b/arch/ppc64/kernel/ptrace32.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * this archive for more details. | 17 | * this archive for more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
@@ -409,6 +410,20 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data) | |||
409 | ret = put_user(child->ptrace_message, (unsigned int __user *) data); | 410 | ret = put_user(child->ptrace_message, (unsigned int __user *) data); |
410 | break; | 411 | break; |
411 | 412 | ||
413 | #ifdef CONFIG_ALTIVEC | ||
414 | case PTRACE_GETVRREGS: | ||
415 | /* Get the child altivec register state. */ | ||
416 | flush_altivec_to_thread(child); | ||
417 | ret = get_vrregs((unsigned long __user *)data, child); | ||
418 | break; | ||
419 | |||
420 | case PTRACE_SETVRREGS: | ||
421 | /* Set the child altivec register state. */ | ||
422 | flush_altivec_to_thread(child); | ||
423 | ret = set_vrregs(child, (unsigned long __user *)data); | ||
424 | break; | ||
425 | #endif | ||
426 | |||
412 | default: | 427 | default: |
413 | ret = ptrace_request(child, request, addr, data); | 428 | ret = ptrace_request(child, request, addr, data); |
414 | break; | 429 | break; |