arch: arc: do not use sleep instruction for nsim smp
It's found that in nsim_hs_smp, sometimes the cpu doesn't response inter-core interrupt after executing sleep instruction. It may be a bug of nsim, but needs more time to investigate the root of this issue. This commit is a workround for this, as nsim is just an instruction simulator, no direct impact. Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
parent
63d3828fa3
commit
d56a12d955
@ -43,7 +43,19 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
|
||||
|
||||
ld r1, [z_arc_cpu_sleep_mode]
|
||||
or r1, r1, (1 << 4) /* set IRQ-enabled bit */
|
||||
/*
|
||||
* 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 is a workround
|
||||
*/
|
||||
#if !defined(CONFIG_SOC_NSIM) && !defined(CONFIG_SMP)
|
||||
sleep r1
|
||||
#else
|
||||
seti r1
|
||||
_z_arc_idle_loop:
|
||||
b _z_arc_idle_loop
|
||||
#endif
|
||||
j_s [blink]
|
||||
nop
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user