@@ -1095,6 +1095,9 @@ static int update_policy_cpu(struct cpufreq_policy *policy, unsigned int cpu,
policy->cpu = cpu;
up_write(&policy->rwsem);
+ blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
+ CPUFREQ_UPDATE_POLICY_CPU, policy);
+
return 0;
}
@@ -368,8 +368,9 @@ static inline void cpufreq_resume(void) {}
#define CPUFREQ_INCOMPATIBLE (1)
#define CPUFREQ_NOTIFY (2)
#define CPUFREQ_START (3)
-#define CPUFREQ_CREATE_POLICY (4)
-#define CPUFREQ_REMOVE_POLICY (5)
+#define CPUFREQ_UPDATE_POLICY_CPU (4)
+#define CPUFREQ_CREATE_POLICY (5)
+#define CPUFREQ_REMOVE_POLICY (6)
#ifdef CONFIG_CPU_FREQ
int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
This reverts commit d9f354460db8 ("cpufreq: remove CPUFREQ_UPDATE_POLICY_CPU notifications"). When the lead cpu of a group of cpus managed by cpufreq is hotplugged out, the cpu device cached in drivers/thermal/cpu_cooling.c needs to be updated accordingly. Bring back the CPUFREQ_UPDATE_POLICY_CPU notifier so that we can react to it. Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Signed-off-by: Javi Merino <javi.merino@arm.com> --- Hi Viresh, We just noticed that you removed this from v4.0-rc1 when we were planning on using it, that's why are reverting the patch. The user is introduced in the next patch: "[PATCH v3 5/5] thermal: cpu_cooling: update the cpu device when cpufreq updates the policy cpu". drivers/cpufreq/cpufreq.c | 3 +++ include/linux/cpufreq.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-)