[POWERPC] Add kernel parameter to set l3cr for MPC745x
[safe/jmp/linux-2.6] / arch / powerpc / kernel / ptrace.c
index 2c1ee2c..2a9fe97 100644 (file)
@@ -530,15 +530,21 @@ static int gpr32_set(struct task_struct *target,
                --count;
        }
 
-       if (kbuf)
+       if (kbuf) {
                for (; count > 0 && pos <= PT_MAX_PUT_REG; --count)
                        regs[pos++] = *k++;
-       else
+               for (; count > 0 && pos < PT_TRAP; --count, ++pos)
+                       ++k;
+       } else {
                for (; count > 0 && pos <= PT_MAX_PUT_REG; --count) {
                        if (__get_user(reg, u++))
                                return -EFAULT;
                        regs[pos++] = reg;
                }
+               for (; count > 0 && pos < PT_TRAP; --count, ++pos)
+                       if (__get_user(reg, u++))
+                               return -EFAULT;
+       }
 
        if (count > 0 && pos == PT_TRAP) {
                if (kbuf)
@@ -581,7 +587,7 @@ static const struct user_regset compat_regsets[] = {
 #endif
 #ifdef CONFIG_SPE
        [REGSET_SPE] = {
-               .n = 35,
+               .core_note_type = NT_PPC_SPE, .n = 35,
                .size = sizeof(u32), .align = sizeof(u32),
                .active = evr_active, .get = evr_get, .set = evr_set
        },
@@ -701,12 +707,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        int ret = -EPERM;
 
        switch (request) {
-       /* when I and D space are separate, these will need to be fixed. */
-       case PTRACE_PEEKTEXT: /* read word at location addr. */
-       case PTRACE_PEEKDATA:
-               ret = generic_ptrace_peekdata(child, addr, data);
-               break;
-
        /* read the word at location addr in the USER area. */
        case PTRACE_PEEKUSR: {
                unsigned long index, tmp;
@@ -734,12 +734,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
                break;
        }
 
-       /* If I and D space are separate, this will have to be fixed. */
-       case PTRACE_POKETEXT: /* write the word at location addr. */
-       case PTRACE_POKEDATA:
-               ret = generic_ptrace_pokedata(child, addr, data);
-               break;
-
        /* write the word at location addr in the USER area */
        case PTRACE_POKEUSR: {
                unsigned long index;