]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ppc64/kernel/ptrace32.c
[PATCH] ppc64: Add PTRACE_{GET|SET}VRREGS
[linux-2.6-omap-h63xx.git] / arch / ppc64 / kernel / ptrace32.c
index 16436426c7e240db5e6599436d149e32d3412aa6..4d1568c946cce2173344c03bba11466e88568ac0 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>
@@ -409,6 +410,20 @@ int sys32_ptrace(long request, long pid, unsigned long addr, unsigned long data)
                 ret = put_user(child->ptrace_message, (unsigned int __user *) 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;