Fix common misspellings
[deliverable/linux.git] / arch / powerpc / kernel / ptrace.c
index 9065369982911f19eab7ee34fa88209597cfbdeb..55613e33e263ac7abb3b1d478f4a27bb9912b86f 100644 (file)
@@ -229,12 +229,16 @@ static int gpr_get(struct task_struct *target, const struct user_regset *regset,
                   unsigned int pos, unsigned int count,
                   void *kbuf, void __user *ubuf)
 {
-       int ret;
+       int i, ret;
 
        if (target->thread.regs == NULL)
                return -EIO;
 
-       CHECK_FULL_REGS(target->thread.regs);
+       if (!FULL_REGS(target->thread.regs)) {
+               /* We have a partial register set.  Fill 14-31 with bogus values */
+               for (i = 14; i < 32; i++)
+                       target->thread.regs->gpr[i] = NV_REG_POISON;
+       }
 
        ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
                                  target->thread.regs,
@@ -459,7 +463,7 @@ static int vr_set(struct task_struct *target, const struct user_regset *regset,
 #ifdef CONFIG_VSX
 /*
  * Currently to set and and get all the vsx state, you need to call
- * the fp and VMX calls aswell.  This only get/sets the lower 32
+ * the fp and VMX calls as well.  This only get/sets the lower 32
  * 128bit VSX registers.
  */
 
@@ -641,11 +645,16 @@ static int gpr32_get(struct task_struct *target,
        compat_ulong_t *k = kbuf;
        compat_ulong_t __user *u = ubuf;
        compat_ulong_t reg;
+       int i;
 
        if (target->thread.regs == NULL)
                return -EIO;
 
-       CHECK_FULL_REGS(target->thread.regs);
+       if (!FULL_REGS(target->thread.regs)) {
+               /* We have a partial register set.  Fill 14-31 with bogus values */
+               for (i = 14; i < 32; i++)
+                       target->thread.regs->gpr[i] = NV_REG_POISON; 
+       }
 
        pos /= sizeof(reg);
        count /= sizeof(reg);
This page took 0.024724 seconds and 5 git commands to generate.