arch: arc: enable the workaround of sleep only for SMP case in nsim

Because the issue of nsim, the sleep instruction doest not work
correctly when SMP is enabled. A workaround is introduced in commit
d56a12d955, this workaround should be enabled only for SMP case in
nsim.

For other cases, no need of this workaround.

This commit fixes #24276

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
Wayne Ren 2020-04-13 15:44:32 +08:00 committed by Carles Cufí
commit c44bd69c9a

View file

@ -47,14 +47,15 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
* It's found that (in nsim_hs_smp), when cpu
* is sleeping, no response to inter-processor interrupt
* although it's pending and interrupts are enabled.
* (Here fire SNPS JIRA issue P10019563-41294 to trace)
* here is a workround
*/
#if !defined(CONFIG_SOC_NSIM) && !defined(CONFIG_SMP)
sleep r1
#else
#if defined(CONFIG_SOC_NSIM) && defined(CONFIG_SMP)
seti r1
_z_arc_idle_loop:
b _z_arc_idle_loop
#else
sleep r1
#endif
j_s [blink]
nop