]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: CPPC: Migrate to ->exit() callback instead of ->stop_cpu()
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 23 Jun 2021 04:24:39 +0000 (09:54 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 30 Jun 2021 16:49:29 +0000 (18:49 +0200)
commit0c3d60e63569e4b3748f7b8cc55d3eedd093591a
tree3291facf3fadbbd98b7f5b7593211188d27f6ba2
parentc8d14bc98e14a3be675b60881f43c6c894fb7220
cpufreq: CPPC: Migrate to ->exit() callback instead of ->stop_cpu()

Commit ace16a422d65 ("cpufreq: Add stop CPU callback to cpufreq_driver
interface") added the ->stop_cpu() callback to allow the drivers to do
clean up before the CPU is completely down and its state can't be
modified.

At that time the CPU hotplug framework used to call the cpufreq core's
registered notifier for different events like CPU_DOWN_PREPARE and
CPU_POST_DEAD. The ->stop_cpu() callback was called during the
CPU_DOWN_PREPARE event.

This is no longer the case, cpuhp_cpufreq_offline() is called only
once by the CPU hotplug core now and we don't really need two
separate callbacks for cpufreq drivers, i.e. ->stop_cpu() and
-<exit(), as everything can be done from the ->exit() callback
itself.

Migrate to using the ->exit() callback instead of ->stop_cpu().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Minor edits in the changelog and subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cppc_cpufreq.c