[PATCH 5/5] ARC: allow userspace DSP applications to use AGU extensions

2019-12-27 Thread Eugeniy Paltsev
To be able to run DSP-enabled userspace applications with AGU (address generation unit) extensions we additionally need to save and restore following registers at context switch: * AGU_AP* * AGU_OS* * AGU_MOD* Signed-off-by: Eugeniy Paltsev --- arch/arc/Kconfig| 7 +++ ar

[RFC 0/5] ARC: handle DSP presence in HW

2019-12-27 Thread Eugeniy Paltsev
Arc processors may have DSP extension which is optional. In this patch series we: * Handle issues caused by DSP extension presence in HW * Add optional support for DSP-enabled applications in userspace (with optional AGU extension support) * Do minor cleanups Eugeniy Paltsev (5): ARC: pt_regs:

[PATCH 4/5] ARC: add support for DSP-enabled userspace applications

2019-12-27 Thread Eugeniy Paltsev
To be able to run DSP-enabled userspace applications we need to save and restore following DSP-related registers: At IRQ/exception entry/exit: * ACC0_GLO, ACC0_GHI, DSP_CTRL * ACC0_LO, ACC0_HI (we already save them as r58, r59 pair) At context switch: * DSP_BFLY0, DSP_FFT_CTRL Signed-off-by: Eu

[PATCH 3/5] ARC: handle DSP presence in HW

2019-12-27 Thread Eugeniy Paltsev
In case of DSP extension presence in HW some instructions (related to integer multiply, multiply-accumulate, and divide operation) executes on this DSP execution unit. So their execution will depend on dsp configuration register (DSP_CTRL) As we want these instructions to execute the same way rega

[PATCH 2/5] ARC: add helpers to sanitize config options

2019-12-27 Thread Eugeniy Paltsev
We'll use this macro in coming patches extensively. Signed-off-by: Eugeniy Paltsev --- arch/arc/kernel/setup.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 7ee89dc61f6e..edb55b6ee278 10

[PATCH 1/5] ARC: pt_regs: remove hardcoded registers offset

2019-12-27 Thread Eugeniy Paltsev
Replace hardcoded registers offset numbers by calculated via offsetof. Signed-off-by: Eugeniy Paltsev --- arch/arc/include/asm/entry-arcv2.h | 8 arch/arc/kernel/asm-offsets.c | 9 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/arc/include/asm/entry-