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>
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index ffffda2..5d1edc5 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -32,10 +32,6 @@
#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 @@
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 @@
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 @@
.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,