diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-09-12 17:56:35 +0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-09-12 17:56:35 +0400 |
commit | 72461997c3c66c29775afa68ca31bea16bf17f39 (patch) | |
tree | ef400b44fe51a5a8fa10a8cbf3ee7f95a0176377 /arch/sh/kernel/ptrace_32.c | |
parent | f9540ececaa2cf94b6760741c82f25097e662383 (diff) | |
download | linux-72461997c3c66c29775afa68ca31bea16bf17f39.tar.xz |
sh: Check SR.DSP bit for DSP regset validity.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/ptrace_32.c')
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 92fe2034f74a..0f44f2b51a60 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c @@ -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 }; |