]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/blackfin/kernel/ptrace.c
Merge branch 'tracing/mmiotrace-mergefixups' into tracing/mmiotrace
[linux-2.6-omap-h63xx.git] / arch / blackfin / kernel / ptrace.c
index 85caf9b711a16ff59eb069a42ee9fb29491a589b..f51ab088098ec1e16162c2c4a62c4c20a42b4b17 100644 (file)
@@ -185,14 +185,15 @@ void ptrace_disable(struct task_struct *child)
 {
        unsigned long tmp;
        /* make sure the single step bit is not set. */
-       tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16);
-       put_reg(child, PT_SR, tmp);
+       tmp = get_reg(child, PT_SYSCFG) & ~TRACE_BITS;
+       put_reg(child, PT_SYSCFG, tmp);
 }
 
 long arch_ptrace(struct task_struct *child, long request, long addr, long data)
 {
        int ret;
        int add = 0;
+       unsigned long __user *datap = (unsigned long __user *)data;
 
        switch (request) {
                /* when I and D space are separate, these will need to be fixed. */
@@ -229,7 +230,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        pr_debug("ptrace: copied size %d [0x%08lx]\n", copied, tmp);
                        if (copied != sizeof(tmp))
                                break;
-                       ret = put_user(tmp, (unsigned long *)data);
+                       ret = put_user(tmp, datap);
                        break;
                }
 
@@ -263,7 +264,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                        } else {
                                tmp = get_reg(child, addr);
                        }
-                       ret = put_user(tmp, (unsigned long *)data);
+                       ret = put_user(tmp, datap);
                        break;
                }
 
@@ -389,7 +390,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                {
 
                        /* Get all gp regs from the child. */
-                       ret = ptrace_getregs(child, (void __user *)data);
+                       ret = ptrace_getregs(child, datap);
                        break;
                }