]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ppc64/kernel/ptrace.c
[PATCH] ppc64: Add PTRACE_{GET|SET}VRREGS
[linux-2.6-omap-h63xx.git] / arch / ppc64 / kernel / ptrace.c
index 2993f108d96d309f6f333bb47b38c86373551239..bf7116d4c4c265d8e9078c38cdf2a4a5547d795c 100644 (file)
@@ -17,6 +17,7 @@
  * this archive for more details.
  */
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
@@ -274,6 +275,20 @@ int sys_ptrace(long request, long pid, long addr, long data)
                break;
        }
 
+#ifdef CONFIG_ALTIVEC
+       case PTRACE_GETVRREGS:
+               /* Get the child altivec register state. */
+               flush_altivec_to_thread(child);
+               ret = get_vrregs((unsigned long __user *)data, child);
+               break;
+
+       case PTRACE_SETVRREGS:
+               /* Set the child altivec register state. */
+               flush_altivec_to_thread(child);
+               ret = set_vrregs(child, (unsigned long __user *)data);
+               break;
+#endif
+
        default:
                ret = ptrace_request(child, request, addr, data);
                break;