Commit 72461997 authored by Paul Mundt's avatar Paul Mundt

sh: Check SR.DSP bit for DSP regset validity.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent f9540ece
...@@ -179,6 +179,14 @@ static int dspregs_set(struct task_struct *target, ...@@ -179,6 +179,14 @@ static int dspregs_set(struct task_struct *target,
return ret; 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 #endif
/* /*
...@@ -213,6 +221,7 @@ static const struct user_regset sh_regsets[] = { ...@@ -213,6 +221,7 @@ static const struct user_regset sh_regsets[] = {
.align = sizeof(long), .align = sizeof(long),
.get = dspregs_get, .get = dspregs_get,
.set = dspregs_set, .set = dspregs_set,
.active = dspregs_active,
}, },
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment