ARC: handle DSP presence in HW
authorEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Thu, 5 Mar 2020 20:02:50 +0000 (23:02 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 16 Mar 2020 17:23:44 +0000 (10:23 -0700)
commit4827d0cf744e7e9cc73f10e1f4eaca904a3868c1
tree2b7f88fe8cb98dcba5aaffebf23bd07570ce6e27
parent240c84b1c22c9912ed1c8a96251b44e85d2ca2ed
ARC: handle DSP presence in HW

When DSP extensions are present, some of the regular integer instructions
such as DIV, MACD etc are executed in the DSP unit with semantics alterable
by flags in DSP_CTRL aux register. This register is writable by userspace
and thus can potentially affect corresponding instructions in kernel code,
intentionally or otherwise. So safegaurd kernel by effectively disabling
DSP_CTRL upon bootup and every entry to kernel.

Do note that for this config we simply zero out the DSP_CTRL reg assuming
userspace doesn't really care about DSP. The next patch caters to the DSP
aware userspace where this reg is saved/restored upon kernel entry/exit.

Reviewed-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/Kconfig
arch/arc/include/asm/arcregs.h
arch/arc/include/asm/dsp-impl.h [new file with mode: 0644]
arch/arc/include/asm/entry-arcv2.h
arch/arc/kernel/head.S
arch/arc/kernel/setup.c