Skip to content

Commit

Permalink
arch: arc: enable the workaround of sleep only for SMP case in nsim
Browse files Browse the repository at this point in the history
Because the issue of nsim, the sleep instruction doest not work
correctly when SMP is enabled. A workaround is introduced in commit
d56a12d, 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>
  • Loading branch information
Wayne Ren authored and carlescufi committed May 26, 2020
1 parent 50ecfd2 commit c44bd69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/arc/core/cpu_idle.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c44bd69

Please sign in to comment.