Commit 343e60e5 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-sleep'

* pm-cpuidle:
  doc: trace: fix reference to cpuidle documentation file
  cpuidle / Documentation: Update cpuidle MAINTAINERS entry

* pm-cpufreq:
  cpufreq: scmi: Fix frequency invariance in slow path
  cpufreq: check if policy is inactive early in __cpufreq_get()
  cpufreq: scpi/scmi: Fix freeing of dynamic OPPs
  cpufreq / Documentation: Update cpufreq MAINTAINERS entry

* pm-sleep:
  PM: sleep: call devfreq suspend/resume
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ Do some work...
The same can also be done from an application program.

Disable specific CPU's specific idle state from cpuidle sysfs (see
Documentation/cpuidle/sysfs.txt):
Documentation/admin-guide/pm/cpuidle.rst):
# echo 1 > /sys/devices/system/cpu/cpu$cpu/cpuidle/state$state/disable


+5 −2
Original line number Diff line number Diff line
@@ -3951,7 +3951,7 @@ L: netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/ethernet/ti/cpmac.c

CPU FREQUENCY DRIVERS
CPU FREQUENCY SCALING FRAMEWORK
M:	"Rafael J. Wysocki" <rjw@rjwysocki.net>
M:	Viresh Kumar <viresh.kumar@linaro.org>
L:	linux-pm@vger.kernel.org
@@ -3959,6 +3959,8 @@ S: Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
T:	git git://git.linaro.org/people/vireshk/linux.git (For ARM Updates)
B:	https://bugzilla.kernel.org
F:	Documentation/admin-guide/pm/cpufreq.rst
F:	Documentation/admin-guide/pm/intel_pstate.rst
F:	Documentation/cpu-freq/
F:	Documentation/devicetree/bindings/cpufreq/
F:	drivers/cpufreq/
@@ -4006,13 +4008,14 @@ S: Supported
F:	drivers/cpuidle/cpuidle-exynos.c
F:	arch/arm/mach-exynos/pm.c

CPUIDLE DRIVERS
CPU IDLE TIME MANAGEMENT FRAMEWORK
M:	"Rafael J. Wysocki" <rjw@rjwysocki.net>
M:	Daniel Lezcano <daniel.lezcano@linaro.org>
L:	linux-pm@vger.kernel.org
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
B:	https://bugzilla.kernel.org
F:	Documentation/admin-guide/pm/cpuidle.rst
F:	drivers/cpuidle/*
F:	include/linux/cpuidle.h

+3 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include <trace/events/power.h>
#include <linux/cpufreq.h>
#include <linux/cpuidle.h>
#include <linux/devfreq.h>
#include <linux/timer.h>

#include "../base.h"
@@ -1078,6 +1079,7 @@ void dpm_resume(pm_message_t state)
	dpm_show_time(starttime, state, 0, NULL);

	cpufreq_resume();
	devfreq_resume();
	trace_suspend_resume(TPS("dpm_resume"), state.event, false);
}

@@ -1852,6 +1854,7 @@ int dpm_suspend(pm_message_t state)
	trace_suspend_resume(TPS("dpm_suspend"), state.event, true);
	might_sleep();

	devfreq_suspend();
	cpufreq_suspend();

	mutex_lock(&dpm_list_mtx);
+4 −8
Original line number Diff line number Diff line
@@ -1530,17 +1530,16 @@ static unsigned int __cpufreq_get(struct cpufreq_policy *policy)
{
	unsigned int ret_freq = 0;

	if (!cpufreq_driver->get)
	if (unlikely(policy_is_inactive(policy)) || !cpufreq_driver->get)
		return ret_freq;

	ret_freq = cpufreq_driver->get(policy->cpu);

	/*
	 * Updating inactive policies is invalid, so avoid doing that.  Also
	 * if fast frequency switching is used with the given policy, the check
	 * If fast frequency switching is used with the given policy, the check
	 * against policy->cur is pointless, so skip it in that case too.
	 */
	if (unlikely(policy_is_inactive(policy)) || policy->fast_switch_enabled)
	if (policy->fast_switch_enabled)
		return ret_freq;

	if (ret_freq && policy->cur &&
@@ -1569,10 +1568,7 @@ unsigned int cpufreq_get(unsigned int cpu)

	if (policy) {
		down_read(&policy->rwsem);

		if (!policy_is_inactive(policy))
		ret_freq = __cpufreq_get(policy);

		up_read(&policy->rwsem);

		cpufreq_cpu_put(policy);
+4 −4
Original line number Diff line number Diff line
@@ -52,9 +52,9 @@ scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index)
	int ret;
	struct scmi_data *priv = policy->driver_data;
	struct scmi_perf_ops *perf_ops = handle->perf_ops;
	u64 freq = policy->freq_table[index].frequency * 1000;
	u64 freq = policy->freq_table[index].frequency;

	ret = perf_ops->freq_set(handle, priv->domain_id, freq, false);
	ret = perf_ops->freq_set(handle, priv->domain_id, freq * 1000, false);
	if (!ret)
		arch_set_freq_scale(policy->related_cpus, freq,
				    policy->cpuinfo.max_freq);
@@ -176,7 +176,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
out_free_priv:
	kfree(priv);
out_free_opp:
	dev_pm_opp_cpumask_remove_table(policy->cpus);
	dev_pm_opp_remove_all_dynamic(cpu_dev);

	return ret;
}
@@ -188,7 +188,7 @@ static int scmi_cpufreq_exit(struct cpufreq_policy *policy)
	cpufreq_cooling_unregister(priv->cdev);
	dev_pm_opp_free_cpufreq_table(priv->cpu_dev, &policy->freq_table);
	kfree(priv);
	dev_pm_opp_cpumask_remove_table(policy->related_cpus);
	dev_pm_opp_remove_all_dynamic(priv->cpu_dev);

	return 0;
}
Loading