Messages in this thread Patch in this message | | | From | Lan Tianyu <> | Subject | [RFC PATCH V3 3/3] Cpufreq: Hold cpu_add_remove_lock before change cpufreq_suspended flag | Date | Thu, 25 Sep 2014 16:32:05 +0800 |
| |
Now, enabling non-boot cpus will parallel with resuming devices. Cpu online may take place after cpufreq resume. But all cpu should be up before clearing cpufreq_suspended flag in the cpufreq_resume(). Cpufreq core uses this flag to decide to do light-weight init or full init. Light -weight init/tear down is dedicated for cpu hotplug during system pm. To keep this rule, hold cpu_add_remove_lock during changing cpufreq_suspended flag.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> --- drivers/cpufreq/cpufreq.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 37951ec..b03f7dd 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1689,7 +1689,9 @@ void cpufreq_resume(void) if (!cpufreq_driver) return; + cpu_maps_update_begin(); cpufreq_suspended = false; + cpu_maps_update_done(); if (!has_target()) return; -- 1.8.4.rc0.1.g8f6a3e5.dirty
| |