]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Check SR.DSP bit for DSP regset validity.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 12 Sep 2008 13:56:35 +0000 (22:56 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 12 Sep 2008 13:56:35 +0000 (22:56 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/ptrace_32.c

index 92fe2034f74ae27bf787c12161eaac882b23026b..0f44f2b51a60562bcd5468e341d0c7e9d5a567a3 100644 (file)
@@ -179,6 +179,14 @@ static int dspregs_set(struct task_struct *target,
 
        return ret;
 }
+
+static int dspregs_active(struct task_struct *target,
+                         const struct user_regset *regset)
+{
+       struct pt_regs *regs = task_pt_regs(target);
+
+       return regs->sr & SR_DSP ? regset->n : 0;
+}
 #endif
 
 /*
@@ -213,6 +221,7 @@ static const struct user_regset sh_regsets[] = {
                .align          = sizeof(long),
                .get            = dspregs_get,
                .set            = dspregs_set,
+               .active         = dspregs_active,
        },
 #endif
 };