diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-02-15 02:22:13 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-03-09 14:41:05 +0100 |
commit | 07aa4402a009bc83194860e7869c491bab854d1c (patch) | |
tree | be3afab0505feb53ea9b67e5c9765a03b9852b36 /drivers/cpufreq/cpufreq_governor.h | |
parent | 6e96c5b3ac5181d4b787590e54c4af99d3fa5f2e (diff) |
cpufreq: governor: Use microseconds in sample delay computations
Do not convert microseconds to jiffies and the other way around
in governor computations related to the sampling rate and sample
delay and drop delay_for_sampling_rate() which isn't of any use
then.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq_governor.h')
-rw-r--r-- | drivers/cpufreq/cpufreq_governor.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h index f21d1e125cba..7ae0c71143fa 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h @@ -163,8 +163,8 @@ struct od_cpu_dbs_info_s { struct cpu_dbs_info cdbs; struct cpufreq_frequency_table *freq_table; unsigned int freq_lo; - unsigned int freq_lo_jiffies; - unsigned int freq_hi_jiffies; + unsigned int freq_lo_delay_us; + unsigned int freq_hi_delay_us; unsigned int sample_type:1; }; @@ -223,17 +223,6 @@ struct od_ops { void (*freq_increase)(struct cpufreq_policy *policy, unsigned int freq); }; -static inline int delay_for_sampling_rate(unsigned int sampling_rate) -{ - int delay = usecs_to_jiffies(sampling_rate); - - /* We want all CPUs to do sampling nearly on same jiffy */ - if (num_online_cpus() > 1) - delay -= jiffies % delay; - - return delay; -} - extern struct mutex dbs_data_mutex; unsigned int dbs_update(struct cpufreq_policy *policy); int cpufreq_governor_dbs(struct cpufreq_policy *policy, unsigned int event); |