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

From: Vineet Gupta
Date: Thu Jan 09 2020 - 17:46:14 EST


On 1/9/20 11:01 AM, Eugeniy Paltsev wrote:
> Hi Vineet,
>
>> From: Vineet Gupta <vgupta@xxxxxxxxxxxx>
>> On 12/27/19 10:03 AM, Eugeniy Paltsev wrote:
>>> 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
> [snip]
>>> +
>>> +#ifndef __ASSEMBLY__
>>> +
>>> +/* some defines to simplify config sanitize in kernel/setup.c */
>>> +#if defined(CONFIG_ARC_DSP_KERNEL) || \
>>> + defined(CONFIG_ARC_DSP_USERSPACE)
>>> +#define ARC_DSP_HANDLED 1
>>> +#else
>>> +#define ARC_DSP_HANDLED 0
>>> +#endif
>> This is a really bad idea - u r introducing explicit include dependencies which
>> can change even outside of arch changes !
>> We've dealt with enough of these problems with current.h, so best to avoid, even
>> if there is some code clutter.
> Hmm, would it be OK if I add this option as a private kconfig option?
> I.E (for ARC_DSP_HANDLED):

Yes that would be good.

-Vineet