aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-03 18:05:22 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-03 18:05:22 -0400
commit08a10002bed151f6df201715adb80c1c5e7fe7ca (patch)
treea9d53ec2b6f5b1921a614f2d4bd70fb6c3a0d42f /include/linux/cpufreq.h
parentbd87c8fb9d2e420e5ddffad0cd1abcadfca75dbd (diff)
parentc49cbc19b31e069cb344921c7286d7549767d10e (diff)
Merge branch 'pm-cpufreq-sched'
* pm-cpufreq-sched: cpufreq: schedutil: Always process remote callback with slow switching cpufreq: schedutil: Don't restrict kthread to related_cpus unnecessarily cpufreq: Return 0 from ->fast_switch() on errors cpufreq: Simplify cpufreq_can_do_remote_dvfs() cpufreq: Process remote callbacks from any CPU if the platform permits sched: cpufreq: Allow remote cpufreq callbacks cpufreq: schedutil: Use unsigned int for iowait boost cpufreq: schedutil: Make iowait boost more energy efficient
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 5f40522ec98c..537ff842ff73 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -127,6 +127,15 @@ struct cpufreq_policy {
127 */ 127 */
128 unsigned int transition_delay_us; 128 unsigned int transition_delay_us;
129 129
130 /*
131 * Remote DVFS flag (Not added to the driver structure as we don't want
132 * to access another structure from scheduler hotpath).
133 *
134 * Should be set if CPUs can do DVFS on behalf of other CPUs from
135 * different cpufreq policies.
136 */
137 bool dvfs_possible_from_any_cpu;
138
130 /* Cached frequency lookup from cpufreq_driver_resolve_freq. */ 139 /* Cached frequency lookup from cpufreq_driver_resolve_freq. */
131 unsigned int cached_target_freq; 140 unsigned int cached_target_freq;
132 int cached_resolved_idx; 141 int cached_resolved_idx;
@@ -562,6 +571,17 @@ struct governor_attr {
562 size_t count); 571 size_t count);
563}; 572};
564 573
574static inline bool cpufreq_can_do_remote_dvfs(struct cpufreq_policy *policy)
575{
576 /*
577 * Allow remote callbacks if:
578 * - dvfs_possible_from_any_cpu flag is set
579 * - the local and remote CPUs share cpufreq policy
580 */
581 return policy->dvfs_possible_from_any_cpu ||
582 cpumask_test_cpu(smp_processor_id(), policy->cpus);
583}
584
565/********************************************************************* 585/*********************************************************************
566 * FREQUENCY TABLE HELPERS * 586 * FREQUENCY TABLE HELPERS *
567 *********************************************************************/ 587 *********************************************************************/