msm: cpufreq: fix a race between hotplug and cpufreq
When msm_cpufreq_target() is called without holding the policy
semaphore, there is a rare chance that the cpu gets hotplugged in
the acpuclk_set_rate. The probability of this issue increases
when cross-calling is used or using interactive governor which
tries to set all cpu frequencies from a single thread.
Add a hotplug notifier and set the device_suspended flag holding
the suspend mutex, when cpu is going down. This mutex is always
held when frequency changes are done.
Change-Id: Ide3aa6927ad60d2512d63761c51bb15117461250
Signed-off-by:
Narayanan Gopalakrishnan <nargop@codeaurora.org>
Loading
Please register or sign in to comment