sh: Fix up DSP context save/restore.
There were a number of issues with the DSP context save/restore code, mostly left-over relics from when it was introduced on SH3-DSP with little follow-up testing, resulting in things like task_pt_dspregs() referencing incorrect state on the stack. This follows the MIPS convention of tracking the DSP state in the thread_struct and handling the state save/restore in switch_to() and finish_arch_switch() respectively. The regset interface is also updated, which allows us to finally be rid of task_pt_dspregs() and the special cased task_pt_regs(). Signed-off-by: Michael Trimarchi <michael@evidence.eu.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:

committed by
Paul Mundt

parent
a27873cd23
commit
01ab10393c
@@ -200,7 +200,8 @@ static int dspregs_get(struct task_struct *target,
|
||||
unsigned int pos, unsigned int count,
|
||||
void *kbuf, void __user *ubuf)
|
||||
{
|
||||
const struct pt_dspregs *regs = task_pt_dspregs(target);
|
||||
const struct pt_dspregs *regs =
|
||||
(struct pt_dspregs *)&target->thread.dsp_status.dsp_regs;
|
||||
int ret;
|
||||
|
||||
ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, regs,
|
||||
@@ -217,7 +218,8 @@ static int dspregs_set(struct task_struct *target,
|
||||
unsigned int pos, unsigned int count,
|
||||
const void *kbuf, const void __user *ubuf)
|
||||
{
|
||||
struct pt_dspregs *regs = task_pt_dspregs(target);
|
||||
struct pt_dspregs *regs =
|
||||
(struct pt_dspregs *)&target->thread.dsp_status.dsp_regs;
|
||||
int ret;
|
||||
|
||||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs,
|
||||
|
Reference in New Issue
Block a user