PM / devfreq: Workaround cpufreq REMOVE_POLICY versus hotplug lock race

It is not possible to ensure the synchronization of REMOVE_POLICY
notifications with CPU hotplug lock; {get,put}_online_cpus ensures
that hotplug cannot happen, but it is still possible to receive
REMOVE_POLICY notifications asynchronously while checking for online
CPUs within a {get,put}_online_cpus critical section.

Account for this by detecting that we haven't yet setup a local state
when the REMOVE_POLICY notification comes in.

Change-Id: I3cb750f3984ebe078154734444660675e8d8b5bc
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
1 file changed