Commit 3a6de246 authored by Murali Nalajala's avatar Murali Nalajala
Browse files

msm: idle-v7.S: Add NOPs to avoid ungraceful exit of GDFS on 8x25



When the core enter into a low power mode (eg: PC/StandalonePC)
it executes the 'wfi' instrcution, which triggers the SPM state
machine and SPM start put the core into low power mode
(PC/StandalonePC). When this is happening there could be a race
between SPM & CPU core (this is because difference of execution
of clock frequencies for SPM and core, as SPM operate at TCXO and
core operate at the order of GHZ), where SPM trying to put the core
into low power mode & same time core sees the 'wfi' instruction as
failure due to an interrupt and fall through after 'wfi' instrcution.

When the above scenario happens system becomes unstable and seeing
kernel panics. To avoid the race between SPM & core, add the 'nop's
in the 'wfi' failure path. These nop's make sure that core doen't
execute memory related instructions (ldr,str etc) until SPM complete
its state transition and stays in a known state.

N nops = 4 clock cycles * (Tcpu/Ttcxo) = 4 * (1.2gig/19.2mhz) = 250

Ttcxo = 1/19.2mhz (52ns)
Tcpu = time period of CPU clock

CRs-Fixed: 359102
Change-Id: I341bdabf011195db5ad08499f229c330ddb900bc
Signed-off-by: default avatarMurali Nalajala <mnalajal@codeaurora.org>
parent 8d21d64d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment