pm: Fix possible race condition in multicore

There is a race condition in a multicore system that happens when the
idle thread in a CPU checks if the state was forced, if not it will
call the policy manager. If a secondary core forces a state after that
this point the value returned by the policy will be rewritten.

Another case is, if a state is forced while a CPU is sleeping,
when this CPU resumes, the forced bit is cleared and the forced state
is never be used.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
1 file changed