summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq_conservative.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-21 02:51:27 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-09 16:41:09 +0300
commit8c8f77fd0719a079450f59debed4f69ede825adb (patch)
tree6e1370e23065e3243f2677742ca479771e39e843 /drivers/cpufreq/cpufreq_conservative.c
parent7d5a9956af4ccf7d5cc0cd1f8d27d1691321bfc6 (diff)
downloadlinux-8c8f77fd0719a079450f59debed4f69ede825adb.tar.xz
cpufreq: governor: Move per-CPU data to the common code
After previous changes there is only one piece of code in the ondemand governor making references to per-CPU data structures, but it can be easily modified to avoid doing that, so modify it accordingly and move the definition of per-CPU data used by the ondemand and conservative governors to the common code. Next, change that code to access the per-CPU data structures directly rather than via a governor callback. This causes the ->get_cpu_cdbs governor callback to become unnecessary, so drop it along with the macro and function definitions related to it. Finally, drop the definitions of struct od_cpu_dbs_info_s and struct cs_cpu_dbs_info_s that aren't necessary any more. 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_conservative.c')
-rw-r--r--drivers/cpufreq/cpufreq_conservative.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index ffffda2dcbfc..5d1edc55aa63 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -32,10 +32,6 @@ static inline struct cs_policy_dbs_info *to_dbs_info(struct policy_dbs_info *pol
#define DEF_SAMPLING_DOWN_FACTOR (1)
#define MAX_SAMPLING_DOWN_FACTOR (10)
-static DEFINE_PER_CPU(struct cs_cpu_dbs_info_s, cs_cpu_dbs_info);
-
-static struct dbs_governor cs_dbs_gov;
-
static inline unsigned int get_freq_target(struct cs_dbs_tuners *cs_tuners,
struct cpufreq_policy *policy)
{
@@ -193,7 +189,7 @@ static ssize_t store_ignore_nice_load(struct dbs_data *dbs_data,
dbs_data->ignore_nice_load = input;
/* we need to re-evaluate prev_cpu_idle */
- gov_update_cpu_data(&cs_dbs_gov, dbs_data);
+ gov_update_cpu_data(dbs_data);
return count;
}
@@ -306,8 +302,6 @@ static void cs_start(struct cpufreq_policy *policy)
dbs_info->requested_freq = policy->cur;
}
-define_get_cpu_dbs_routines(cs_cpu_dbs_info);
-
static struct dbs_governor cs_dbs_gov = {
.gov = {
.name = "conservative",
@@ -316,7 +310,6 @@ static struct dbs_governor cs_dbs_gov = {
.owner = THIS_MODULE,
},
.kobj_type = { .default_attrs = cs_attributes },
- .get_cpu_cdbs = get_cpu_cdbs,
.gov_dbs_timer = cs_dbs_timer,
.alloc = cs_alloc,
.free = cs_free,