From 01ab10393c510342ec4ce85df11ccfa3df06bbb2 Mon Sep 17 00:00:00 2001 From: Michael Trimarchi Date: Fri, 3 Apr 2009 17:32:33 +0000 Subject: 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 Signed-off-by: Paul Mundt --- arch/sh/include/asm/processor_32.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'arch/sh/include/asm/processor_32.h') diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index efdd78a53b1..9a8714945dc 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h @@ -57,6 +57,14 @@ asmlinkage void __init sh_cpu_init(void); #define SR_IMASK 0x000000f0 #define SR_FD 0x00008000 +/* + * DSP structure and data + */ +struct sh_dsp_struct { + unsigned long dsp_regs[14]; + long status; +}; + /* * FPU structure and data */ @@ -96,6 +104,11 @@ struct thread_struct { /* floating point info */ union sh_fpu_union fpu; + +#ifdef CONFIG_SH_DSP + /* Dsp status information */ + struct sh_dsp_struct dsp_status; +#endif }; /* Count of active tasks with UBC settings */ -- cgit v1.2.3