diff options
author | Eugeniy Paltsev | 2020-03-05 23:02:51 +0300 |
---|---|---|
committer | Vineet Gupta | 2020-03-16 10:30:49 -0700 |
commit | 7321e2ea0d6aece516a9c0827028ecda2ccaeae9 (patch) | |
tree | d53d77373a555448b2ef633c04e84dc9f3c6cc38 /arch/arc/kernel | |
parent | 4827d0cf744e7e9cc73f10e1f4eaca904a3868c1 (diff) |
ARC: add support for DSP-enabled userspace applications
To be able to run DSP-enabled userspace applications we need to
save and restore following DSP-related registers:
At IRQ/exception entry/exit:
* DSP_CTRL (save it and reset to value suitable for kernel)
* ACC0_LO, ACC0_HI (we already save them as r58, r59 pair)
At context switch:
* ACC0_GLO, ACC0_GHI
* DSP_BFLY0, DSP_FFT_CTRL
Reviewed-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r-- | arch/arc/kernel/asm-offsets.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arc/kernel/asm-offsets.c b/arch/arc/kernel/asm-offsets.c index c783bcd35eb8..0e884036ab74 100644 --- a/arch/arc/kernel/asm-offsets.c +++ b/arch/arc/kernel/asm-offsets.c @@ -12,6 +12,7 @@ #include <asm/hardirq.h> #include <asm/page.h> + int main(void) { DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); @@ -75,6 +76,9 @@ int main(void) OFFSET(PT_r58, pt_regs, r58); OFFSET(PT_r59, pt_regs, r59); #endif +#ifdef CONFIG_ARC_DSP_SAVE_RESTORE_REGS + OFFSET(PT_DSP_CTRL, pt_regs, DSP_CTRL); +#endif return 0; } |